"Spaceship!" by The Guardian's Gamesblog Community

The story headline is "A Collaborative Interactive Fiction".
The story genre is "Science Fiction ".
The release number is 2.
The story description is "The aim was simply to create the greatest group-generated text adventure in the world ever.".
The story creation year is 2008.

Release along with cover art, the introductory booklet, a solution, a library card ,the source text , a file of "Ship Schematic" called "schematic.jpg", a file of "Alternate Artwork 1" called "alternate-artwork-1.jpg", and a file of "Alternate Artwork 2" called "alternate-artwork-2.jpg".

[The following code is used to include any extensions, the documentation for which can be found by viewing the Documentation tab and clicking the Installed Extensions link]

[This is needed to construct the help menus]
Include Menus by Emily Short. 

[Even though this increases the bloat, it's necessary to make handling Bryan's movement routines easier]
Include Locksmith by Emily Short.

[This is needed to construct the layout of windows]
Include Flexible Windows by Jon Ingold.

[Need this to make our game compile]
Use MAX_STATIC_DATA of 140000.

Include GNU General Public License v3 by Free Software Foundation.

The GPL's recommended announcement at startup rule is not listed in any rulebook.


Part - Game Windows

Chapter - Window Setup

Section - Side Window

The use inventory to set pronouns rule is not listed in any rulebook.

The side-window is a g-window spawned by the main-window.
The scale method of the side-window is g-fixed-size.
The measurement of the side-window is 30.
The position of the side-window is g-placeleft.
The drawing rule of the side-window is the construct inventory rule.
This is the construct inventory rule:
	move focus to side-window, clearing the window;
	try taking inventory;
	return to main screen.

Every turn when the side-window is g-present: follow the drawing rule of the side-window.


Section - Graphics Window

The graphics-window is a g-window spawned by the side-window.
The type of the graphics-window is g-graphics.
The scale method of the graphics-window is g-fixed-size.
The measurement of the graphics-window is 120.
The position of the graphics-window is g-placeabove.
The drawing rule of the graphics-window is the draw scaled image rule.


Section - Figures

Figure 1 is the file "Small Cover.jpg".


Section - Draw Cover Art Image

The current image is a figure-name that varies.
The internally selected picture is a figure-name that varies.

This is the draw scaled image rule:
	change the internally selected picture to the current image;
	if graphics-window is g-unpresent, rule fails;
	clear the graphics-window;
	draw scaled copy of internally selected picture in graphics-window.

When play begins:
	open up the graphics-window;
	change the current image to Figure 1;
	follow the drawing rule of the graphics-window.


Section - Draw Scaled Image

To draw scaled copy of (f - a figure-name) in (g - a g-window)::
	(- DrawScaled({f}, {g});-).
Include (-  

	! Doing scaling calculations in I6 lets us handle bigger numbers

	[ GetImageSize curimg index result;
		if (curimg == 0) rfalse;
		result = glk_image_get_info( curimg, gg_arguments,  gg_arguments+WORDSIZE);
		return gg_arguments-->index;
	];

	[ DrawScaled figure g w_total h_total graph_height graph_width w_offset h_offset;
	graph_height = WindowSize(g, 1);
	graph_width = gg_arguments-->0;
	w_total = GetImageSize(figure, 0);
	h_total = gg_arguments-->1;

	if (graph_height - h_total < 0) !	if the image won't fit, find the scaling factor
	{
		w_total = (graph_height * w_total)/h_total;
		h_total = graph_height;
	}

	if (graph_width - w_total < 0)
	{
		h_total = (graph_width * h_total)/w_total;
		w_total = graph_width;
	}

	w_offset = (graph_width - w_total)/2; if (w_offset < 0) w_offset = 0;
	h_offset = (graph_height - h_total)/2; if (h_offset < 0) h_offset = 0;

	glk_image_draw_scaled(g.ref_number, figure, w_offset, h_offset, w_total, h_total); ]; -).


Section - Toggling the game window

 Toggling the game window is an action out of world. Understand  "toggle" or "toggle window" or "toggle windows" or "toggle inventory" as toggling the game window.

Carry out toggling the game window:
	if the side-window is g-present and the graphics-window is g-present: 
		shut down the graphics-window instead;
	if the side-window is g-present and the graphics-window is g-unpresent:
		shut down the side-window instead;
	if the side-window is g-unpresent and the graphics-window is g-unpresent:
		open up the side-window;
		open up the graphics-window.

Report toggling the game window:
	say italic type;
	if the side-window is g-present and the graphics-window is g-present: 
		say "Inventory/Cover/Main.";
	if the side-window is g-present and the graphics-window is g-unpresent:
		say "Inventory/Main.";
	if the side-window is g-unpresent and the graphics-window is g-unpresent:
		say "Main only.";
	say roman type.
	




Part - Actions

Chapter - New Actions

Section - Bending

[This is used to bend the hanger for the Saving Bryan puzzle]

Bending is an action applying to one touchable thing.
Understand "bend [something preferably held]" as bending.

Carry out bending (this is the block bending rule):
	say "That is not something you can bend."


Section - Reading

[This is used to read the technical manual]

Reading is an action applying to one touchable thing.
Understand "read [something preferably held]" as reading.

Carry out reading (this is the block reading rule):
	say "There is nothing to read on that."
	
Instead of reading something:
	if noun is not the technical manual:
		try examining the noun.


Section - Combining it with

[This is used to assemble the modified harpoon gun]

Combining it with is an action applying to two things.

Understand "combine [something preferably held] with/to/and [something preferably held]" as combining it with.

Understand the commands "join" or "connect" or "interlock" or "link" or "marry" or "merge" or "stick" as "combine".

Check combining it with:
	if the noun is the second noun:
		say "Now you're just being silly." instead;
	if the noun is not connectable:
		if the second noun is not connectable:
			say "Combining the [noun] with the [second noun] achieves nothing." 
			
Understand "use [something connectable] with/on [something connectable]" as combining it with.


Section - Cracking

Cracking is an action applying to one thing.

Understand the command "crack" as something new.

Understand "crack [something]" as cracking.

Understand "pick [something]" as cracking.

Check cracking:
	if the noun is not the drug safe:
		say "The [noun] isn't something that needs to be cracked."


Section - Cutting it with

[This is used to cut the hanger with the pliers]

Cutting it with is an action applying to two things.

Understand "cut [something] with [something preferably held]" as cutting it with.

Understand the commands "rip" or "rip up/apart" or "tear up/apart" or "cleave" or "sever" or "pare" or "snip" as "cut".

Definition: something is sharp:
	if it is the pliers, decide yes;
	if it is the packing knife, decide yes;
	otherwise decide no.

Check cutting it with:
	if the second noun is nothing:
		try cutting;
	if the noun is the second noun:
		say "Cutting the [noun] with the [second noun] is impossible, as you well know.";
	if the noun is not the packing knife:
		say "The [noun] isn't something you can cut with.";
	if the second noun is not something sharp:
		say "The [second noun] is not something you need to cut.".


Section - Getting out of

Getting out of is an action applying to one thing.

Definition: something is exitable:
	if the player is in it then decide yes;
	if the player is on it then decide yes;
	otherwise decide no.

Understand "get out of [something exitable]" as getting out of.

Understand "leave [something exitable]" as getting out of.

Carry out getting out of something:
	try exiting.


Section - Going up using

Going up using is an action applying to one thing.

Understand "go up [ladder]" or "ascend [ladder]" as going up using.

Check going up using:
	unless the noun is a ladder:
		say "That's impossible to go up.". 
	
Carry out going up using:
	try going up.


Section - Going down using

Going down using is an action applying to one thing.

Understand "go down [ladder]" or "descend [ladder]" as going down using.
	
Check going down using:
	unless the noun is a ladder:
		say "That's impossible to go down."			
	
Carry out going down using:
	try going down.
		

Section - Filling it with

Filling it with is an action applying to two things.

Understand "fill [something] with [something preferably held]" as filling it with.

Check filling it with:
	say "The [noun] isn't something that you need to fill. And certainly not with [a second noun] -- that's simply ridiculous."


Section - Hugging

Hugging is an action applying to one thing. 

Understand "hug [something]" as hugging.

Check hugging:
	say "You hug the [noun] but don't feel any better."


Section - Talk to

Understand "talk to [someone]" as a mistake ("To start a conversation, try to ASK [the noun] ABOUT something or TELL [the noun] ABOUT something.")


Section - Pulling with something

Pulling it with is an action applying to two things.

Understand "pull [something] with/using [something preferably held]" as pulling it with

Check pulling it with:
	say "Pulling the [noun] with the [second noun] won't do any good."


Section - Turning up / down

[This is used for turning up / down the hearing aid]

Turning up is an action applying to one thing.
Turning down is an action applying to one thing.

Understand "turn up [something preferably held]" as turning up.
Understand "turn up [volume] on/of [something preferably held]" as turning up.
Understand "turn [something preferably held] up" as turning up.
Understand "turn down [something preferably held]" as turning down.
Understand "turn [something preferably held] down" as turning down.

Check turning up:
	if the noun is not the hearing aid:
		say "That doesn't appear to have a volume control.".

Check turning down:
	if the noun is not the hearing aid:
		say "That doesn't appear to have a volume control.".


Section - Turning up to / down to

[This is used for turning up / down the hearing aid to a specified value]

Turning upto is an action applying to one thing and one number.
Turning downto is an action applying to one thing and one number.

Understand "turn up [something preferably held] to [number]" as turning upto.
Understand "turn [something preferably held] up to [number]" as turning upto.
Understand "turn up [volume] on/of [something preferably held] to [number]" as turning upto.
Understand "turn down [something preferably held] to [number]" as turning downto.
Understand "turn [something preferably held] down to [number]" as turning downto.
Understand "turn down volume on/of [something preferably held] to [number]" as turning downto.

Understand "volume" or "the volume" as "[volume]".

Check turning upto:
	if the noun is not the hearing aid:
		say "That doesn't appear to have a volume control.".

Check turning downto:
	if the noun is not the hearing aid:
		say "That doesn't appear to have a volume control.".


Section - Firing it at/Shooting it with

[This is used for the harpoon gun / hull plate puzzle]

Firing it at is an action applying to two things. 

Understand "fire [something preferably held] at/towards/into [something visible]" as firing it at.
Understand "fire [something preferably held] out of the [something visible]" as firing it at.

Understand "shoot [something preferably held] at [something visible]" as firing it at.

Understand "shoot [something visible] with/using [something preferably held]" as firing it at (with nouns reversed).
Understand "shoot at [something visible] with/using [something preferably held]" as firing it at (with nouns reversed).
Understand "shoot [something preferably held] out of the [something visible]" as firing it at.

Understand the commands "aim" or "launch" as "fire".
Understand the commands "blast" or "snipe" as "shoot".

Definition: something is a gun:
	if it is the harpoon gun then decide yes;
	if it is the pacifist mk3 rifle then decide yes;
	otherwise decide no.

Check firing it at:
	if the noun is not a gun:
		say "The [noun] is not something that you can fire.";
	otherwise if the second noun is not the hull plate:
		say "This isn't a toy. You'd better wait until you have a good reason to fire it."


Section - Inputting it on

Inputting it on is an action applying to a number and one thing.
Understand "type [number] on/in/into/onto [something visible]" as inputting it on.

Understand the command "input" as "type".

Check inputting it on:
	if the second noun is not the access panel:
		say "That's not something you can input a number on." instead;
	otherwise if inner airlock door is access denied:
		say "You input the number onto the panel, but nothing happens. Drat. Wrong passcode.".	


Section - Plugging In

[This is used to plug in the pinchinko machine]

Plugging in is an action applying to one thing. 
Understand "plug in [something visible]" as plugging in.

Check plugging in (this is the block plugging in rule):
	say "That doesn't have a plug on it.";


Section - Flushing it

[This is used to flush the loo ]

Flushing is an action applying to one thing.
Understand "flush [something]" as flushing.

Check flushing (this is the block flushing rule):
	say "That can't be flushed."


Section - Fixing it

Fixing is an action applying to one thing.

Understand the command "fix" as something new.

Understand "fix [something]" as fixing.

Check fixing something:
	say "The [noun] doesn't need fixing."
	
Understand the commands "mend" or "repair" as "fix".


Section - Listening with

Listening to it with is an action applying to two things.

Understand "listen to [something] with/using [something preferably held]" as listening to it with.

Check listening to it with:
	unless the second noun is the stethoscope:
		say "You can't listen to the [noun] using the [second noun]".


Section - Poking it

[This is used to poke the synthetic eye]

Poking is an action applying to one thing.
Understand "poke [something]" or "prod [something]" as poking.

Check poking (this is the block poking rule):
	say "You poke the [noun] but nothing happens.".


Section - Hitting it with

[This is used so that the player can hit the charred fusebox with the spanner, some of the credit for this code must go to Dave Chapeskie]	

Hitting it with is an action applying to one thing and one carried thing.
Understand the command "hit" as something new.
Understand "hit [something] with [something preferably held]" as hitting it with.
Understand "hit [something]" as attacking.

Understand "attack [something] with [something preferably held]" as hitting it with.

Understand the commands "clobber" or "demolish" or "strike" or "whack" as "hit".

Check hitting it with (this is the block hitting it with rule):
	say "Violence isn't the answer to this one.".


Section - Headbutting

Headbutting is an action applying to one thing.

Understand "headbutt [something]" as headbutting.

Check headbutting:
	say "It makes no sense to headbutt the [noun]."
	

Section - Kneeling

[This is used to kneel to the statue of zod]

Kneeling before is an action applying to one visible thing.
Understand "kneel before/to [something]" as kneeling before.


Section - Emptying

[This is used to try and empty the bin]

Emptying is an action applying to one visible thing.
Understand "empty [something]" as emptying.

Check emptying:
	say "You see no reason to empty the [noun]."


Section - Sealing it with

[This is used to seal the hull breach]

Sealing it with is an action applying to two things. 
Understand "seal [something] with/using [something preferably held]" as sealing it with.

Understand the command "cover" as something new.
Understand the commands "block" or "cover" as "seal".

Check sealing it with:
	if the noun is the second noun:
		say "Now you're just being silly." instead;
	otherwise if the noun is not the hull breach:
		say "The [noun] isn't something that needs sealing.";
	otherwise if the second noun is not the hull plate:
		say "You can't seal the [noun] with the [second noun]. You need something else."


Section - Spraying it over

[This is used to spray packing foam on the engine nozzle]

Spraying it over is an action applying to two things. 
Understand "spray [something preferably held] over/on [something]" as spraying it over.

Check spraying it over:
	if the noun is the second noun:
		say "Now you're just being silly." instead;
	otherwise if the noun is not the can of instant packing foam:
		say "The [noun] is not something you can spray." instead;
	otherwise if the second noun is not the right starter nozzle:
		say "You see no reason to cover the [second noun] in packing foam." instead.


Section - Squirting it on

[This is used for the targeted advertising puzzle]

Squirting it on is an action applying to one thing and one touchable thing.

Understand "squirt [something preferably held] on/over/onto/to [something]" as squirting it on. 

Understand the command "apply" or "squirt some" as "squirt".

Check squirting it on:
	if the noun is not the space-o-lube:
		say "The [noun] is not squirtable."


Section - Sleeping on

[This is used for sleeping on the examination couch]

Sleeping on is an action applying to one thing.

Understand "sleep on [something]" as sleeping on.

Check sleeping on:
	if the noun is not the examination couch:
		say "You don't want to sleep on that.".


Section - Use

[Lifted word for word from the Alpaca Farm example in the Inform7 manual]

Using is an action applying to one thing.
Understand "use [something]" as using.

Carry out using: say "You will have to be more specific about your intentions.".

Using it on is an action applying to two things.

Understand "use [something preferably held] with/on/in [something]" as using it on.

Check using it on:
	say "Using the [noun] on the [second noun] wouldn't achieve anything."

Understand "use [an edible thing]" as eating.
                
Definition: something is excluded:
	if it is the microwave then decide yes;
	otherwise decide no.

Understand "use [a not excluded closed openable container]" as opening. 
Understand "use [an not excluded open openable container]" as closing.
        
Understand "use [something preferably held] on [a locked lockable thing]" as unlocking it with (with nouns reversed).
Understand "use [something preferably held] on [an unlocked lockable thing]" as locking it with (with nouns reversed).
        
Understand "use [a switched off device]" as switching on.
        
Understand "use [a door]" as opening. Understand "use [an open door]" as entering.

[puzzle related changes]

Understand "use [spanner] on [charred fusebox]" as unlocking it with(with nouns reversed).

Understand "use [space-o-lube tube] on [armoury door]" as putting it on.


Section - Washing with 

[This is used for trying to wash with the washbasin]

Washing with is an action applying to one thing.
Understand "wash with [something visible]" as washing with.

Check washing with:
	say "That's not something you can wash with."


Section - Wiping / wiping it with

[This is used in the Targeted Advertising (armoury door) puzzle]

Wiping is an action applying to one thing.

Understand "wipe [something visible]" as wiping.
Understand "clean [something visible]" as wiping.

Check wiping:
	if the noun is not the oily feet:
		say " [The noun] [if the noun is plural-named]don't [otherwise]doesn't [end if]need wiping.".
		
Wiping it with is an action applying to two things.

Understand "wipe [something visible] with [something preferably held]" as wiping it with.
Understand "clean [something visible] with [something preferably held]" as wiping it with.

Check wiping it with:
	say "The [noun] doesn't need wiping[run paragraph on]";
	if the second noun is not the small lemon-scented moist hand towel:
		say " especially not with a [second noun].";
	otherwise:
		say ".";


Section - Shaking

[This is used to shake the tomato sauce bottle]

Shaking is an action applying to one thing.

Understand "shake [something visible]" as shaking.

Check shaking:
	say "That's not something you can shake.".


Section - Sucking

Sucking is an action applying to one thing.

Understand "suck [something]" as sucking.

Check sucking:
	say "The [noun] isn't something that you can suck[if the helmet is worn], in any case, that's a bit hard to do with a helmet on[end if]"


Section - Raise/Lower Chair

[This is used for raising and lowering the captains chair, and others if needed]

A chair_position is a kind of value.
The chair_positions are raised, normal, and lowered.

Understand the commands "raise" and "lower" as something new.

Understand "raise [something visible]" as raising.
Understand "lower [something visible]" as lowering.

Raising is an action applying to one thing.
Lowering is an action applying to one thing.

Check raising:
	if the noun is not a chair:
		say "You can't raise that.";
		stop the action;
	otherwise:
		if the holder of the actor is not the noun:
			say "You need to be in the chair to raise it.";
			stop the action;
		otherwise if the chair_position of the noun is raised:
			say "The chair is already raised.";
			stop the action;
		otherwise:
			if the chair_position of the noun is normal:
				change the chair_position of the noun to raised;
				say "You raise the chair a little.";
			otherwise:
				change the chair_position of the noun to normal;
				say "You raise the chair back to centre.".

Check lowering:
	if the noun is not a chair:
		say "You can't lower that.";
		stop the action;
	otherwise:
		if the holder of the actor is not the noun:
			say "You need to be in the chair to lower it.";
			stop the action;
		otherwise if the chair_position of the noun is lowered:
			say "The chair is already lowered.";
			stop the action;
		otherwise:
			if the chair_position of the noun is normal:
				change the chair_position of the noun to lowered;
				say "You lower the chair a little.";
			otherwise:
				change the chair_position of the noun to normal;
				say "You lower the chair back to centre.".


Section - Posture Rules 

[*** Taken these out for the moment as they were clouding my understanding of how get in and out of containers and supporters -- since we don't seem to make much use of the new facilities provided by these rules, maybe we should lose them for simplicities sake?

Any thoughts Barry? ***

]

[Taken from example in 'inform7' documentation and modified

A posture is a kind of value.
The postures are standing, seated, and lying.

A person has a posture.
The posture of a person is usually standing.

A supporter has a posture

Posture-permission relates various supporters to various postures. 
The verb to allow (it allows, they allow, it allowed, it is allowed) implies the posture-permission relation.

Understand the commands "stand" and "sit" and "lie" as something new.

Understand "stand on [something]" as standing on.
Understand "sit on [something]" as sitting on.
Understand "lie on [something]" as lying on.

Standing on is an action applying to one thing.
Sitting on is an action applying to one thing.
Lying on is an action applying to one thing.

Carry out an actor standing on:
	if the holder of the actor is not the noun, silently try the actor entering the noun;
	if the holder of the actor is the noun:
		if the actor is not standing, try the actor taking position standing;
		otherwise follow the report taking position rules.

Carry out an actor sitting on:
	if the holder of the actor is not the noun, silently try the actor entering the noun;
	if the holder of the actor is the noun:
		if the actor is not seated, try the actor taking position seated;
		otherwise follow the report taking position rules.

Carry out an actor lying on:
	if the holder of the actor is not the noun, silently try the actor entering the noun;
	if the holder of the actor is the noun:
		if the actor is not lying, try the actor taking position lying;
		otherwise follow the report taking position rules.

Understand "stand" or "stand up" as standing up.
Understand "sit down" or "sit" or "sit up" as sitting down.
Understand "lie down" as lying down.

Standing up is an action applying to nothing.
Sitting down is an action applying to nothing.
Lying down is an action applying to nothing.

Taking position is an action applying to one posture.

Instead of an actor standing up:
	if the holder of the actor is a chair:
		try the actor getting off holder of the actor;
	otherwise:
		try the actor taking position standing; 
		rule succeeds.

Instead of an actor sitting down:
	try the actor taking position seated; rule succeeds.

Instead of an actor lying down:
	try the actor taking position lying; rule succeeds.

Check an actor taking position:
	if the posture understood is the posture of the actor:
		if the actor is the player:
			say "You are already [the posture understood].";
		otherwise:
			if the actor is visible, say "[The actor] is already [the posture understood].";
		stop the action;
	otherwise if the holder of the actor is not a room and the holder of the actor does not allow the posture understood:
		if the actor is the player:
			say "You can't take that position on [the holder of the actor].";
		otherwise if the actor is visible:
			say "[The actor] can't take that position.";
		stop the action.

Carry out an actor taking position:
	change the posture of the actor to the posture understood.

Report someone taking position (this is the position-report rule):
	say "[The actor] is now [the posture of the actor][if the holder of the actor is not the location of the actor] on [the holder of the actor][end if].".

Report taking position:
	say "You are now [the posture of the player][if the holder of the player is not the location] on [the holder of the actor][end if].".

Carry out an actor exiting (this is the departure-posture rule):
	let N be the holder of the actor;
	if N is a supporter, change the posture of the actor to the posture of N;
	otherwise change the posture of the actor to standing.

The departure-posture rule is listed after the standard getting off rule in the carry out getting off rulebook.

Carry out an actor entering something (this is the arrival-posture rule):
	if the noun is a supporter, change the posture of the actor to the posture of the noun.

The arrival-posture rule is listed after the standard entering rule in carry out entering rulebook.

Check an actor going somewhere:
	if the actor is in a room and the actor is not standing:
		say "([if the actor is not the player][the actor][end if] first standing up)[command clarification break]";
		silently try the actor taking position standing;
		if the actor is not standing, stop the action.]
				

Section - Playing

[This is used so user can try and play the arcade machines]

Playing is an action applying to one touchable thing.
Understand "play [something]" as playing.

Carry out playing (this is the block playing rule):
	say "That is not something you can play."


Section - Press/Activate/Flip/Flick/Toggle

[This is used for various switching etc throughout the game]

Understand "press [a visible device]" as switching on.
Understand "activate [something switched off]" as switching on.
Understand "deactivate [something switched on]" as switching off.
Understand "flip [something switched off]" as switching on. 
Understand "flip [something switched on]" as switching off. 
Understand "flick [something switched off]" as switching on. 
Understand "flick [something switched on]" as switching off. 


Chapter - Adjustments to the existing actions

Section - Attacking

Understand "crack [something portable]" as attacking.

Understand the command "snap"or "kick" as "attack".


Section - Go

Understand "go" as a mistake("You need to provide a direction to go to in conjunction with the go command. For example, go port.")


Section - Eat

Understand "chew [something edible]" as eating.


Section - Taking

Understand the commands "grab" or "acquire" or "get hold of" or "obtain" or "collect" or "snatch" or "pocket" or "sequester" as take.

Understand "remove [something not wearable]" as taking.


Section - Entering

Understand "lie on/in [supporter]" as entering.


Part - Adjustments to the World Model

Chapter - Directions

Section - New Directions

[North]

The fore is a direction. 
The fore has opposite aft. 
Understand "f" as fore.

Before going north:
	say "(going  fore)[command clarification break]";
	try going fore instead.

[West]

The port is a direction. 
The port has opposite starboard. 
Understand "p" as port.

Before going  west:
	say "(going  port)[command clarification break]";
	try going port instead.



[East]

The starboard is a direction.
The starboard has opposite port.
Understand "st" or "sb" as starboard.

Before going east:
	say "(going  starboard)[command clarification break]";
	try going starboard instead.


[South]

The aft is a direction. 
The aft has opposite fore. 
Understand "a" as aft.

Before going south:
	say "(going  aft)[command clarification break]";
	try going aft instead.

Section - Wrong Directions

Using the wrong directions is an action out of world.

Understand  "ne" or "northeast" or "se" or "southeast" or "sw" or "southwest" or "nw" or "northwest" as using the wrong directions.

Report using the wrong directions:
	say "In this game, only the directions fore(f), aft(a), starboard(st), port(p), up,  and down are used."






Section - New Directions

[ DIRECTIONS SETUP 1 The starboard is a direction. 
The starboard has opposite port. 
Understand   "sb" or "s" as starboard.

The port is a direction. 
The port has opposite starboard. 
Understand "p" as port.

The fore is a direction. 
The fore has opposite aft. 
Understand "f" as fore.

The aft is a direction. 
The aft has opposite fore. 
Understand "a" as aft.

Index map with fore mapped as north. 
Index map with aft mapped as south.
Index map with port mapped as west. 
Index map with starboard mapped as east.

Does the player mean going starboard: it is likely.


Section - Wrong Directions

Using the wrong directions is an action out of world.

Understand "n" or "north" or "ne" or "northeast" or "e" or "east" or  "south" or "se" or "southeast" or "sw" or "southwest" or "w" or "west" or "nw" or "northwest" as using the wrong directions.

Carry out using the wrong directions:
	now the player is shipboard-aware.

Report using the wrong directions:
	say "On a ship the directions port(p), starboard(s), fore(f) and aft(a) are used."]
	

Chapter - Existing kinds

[This chapter contains any modifications to the existing kinds]

Section - Doors

[DOOR]

A door is usually scenery. 

Understand the closed property as describing a door.
Understand the open property as describing a door.

[DOORWAYS]	

A doorway is a kind of door.

Definition: a doorway is inoperable:
	if it is manual then decide no;
	if it is in an unpowered room then decide yes;
	otherwise decide no.	

A doorway can be automatic or manual. 
A doorway is usually automatic. 
A doorway has some text called the opening behaviour.
The opening behaviour is usually "[one of]glides[or]slides[at random] [one of]smoothly[or]gently[at random] open". 

Instead of examining an open doorway(called target):
	say "It's open, and leads through to [the other side of the target].".
	
Instead of attacking a closed doorway:
	say "The door is three inches of metal, and designed to be resistant to all manner of alien invasion; it's not going to succumb to your [one of]cack-handed violence[or]pathetic attacks[at random].".
	
Instead of attacking an open doorway:
	say "It's already open, meaning two things: firstly, there's nothing to attack, and secondly, there's no reason to attack.".
	
Instead of looking under a doorway(called target):
	say "You crouch down, and try to look under the [target], but there's barely a millimetre of space to see through.".
	
Instead of hitting a closed doorway(called target) with the second noun:
	say "Your [attack-strength] [second noun] [attack-type] [attack-effect] [attack-result] [the target]. Hang your head in shame, [random-title].".

Instead of opening an inoperable closed doorway(called target):
	say "[one of]You head for the [target] in the vain hope that some power is going to it, but, unsurprisingly, it doesn't open; the emergency generator just isn't powerful enough to supply power to every deck.[or]You try opening the [target], but quickly realise that there's no physical way to do so; no handle, no knocker, no dodgy fusebox to trash, nothing. You're going to need to fix the generator before you can open it.[or]Since there's no electricity going to the [target], you're going to need to get the Honnecourt Generator back online before you can go through here.[or]You bang on the [target] in frustration -- and as expected, nothing happens.[stopping]".
		
Before going through a closed automatic doorway(called target):
	if the player is not in the holder of the target:
		say "(first exiting the [holder of the player])[command clarification break]";
		silently try exiting;
	if the target is not in an unpowered room:
		say "The [target] [opening behaviour of the target].";
		silently try opening the target;
	otherwise if the target is in an unpowered room:
		silently try opening the target instead;
	otherwise:
		continue the action.
	
After going through an open automatic doorway(called target):
	silently try closing the target;
	continue the action.	


Section - Airlock door

An airlock_door is a kind of doorway.
An airlock_door is always manual.
An airlock_door can be sealed or unsealed.
An airlock_door is usually sealed.
	
Understand "doors" or "airlock doors" or "circular doors" as an airlock door.

Instead of examining a closed airlock_door(called target):
	say "It's rounded at the corners, dull and grey, with a single small porthole to look out of."

A small porthole is a kind of thing. 
A small porthole is part of every airlock_door. 

Instead of examining the small porthole(called target):
	let parent be the holder of the target;
	say "Through the [target] you can see [other side of the parent]."
	
Understand "look out [small porthole]" as examining.
		
Instead of examining an open airlock_door(called target):
	if the target is in the airlock:
		if the target is the inner airlock door:
			say "It's open and leads back into [the other side of the target].";
		if the target is the outer airlock door:      
			say "All you can see through the open airlock door is the cold darkness of space.";
	otherwise:
		continue the action.

Instead of opening a closed airlock_door(called target) in the airlock:
	say "You can't open [target] directly, it's operated by standing on the [if the target is the outer airlock door][outer airlock button][end if][if the target is the inner airlock door][inner airlock button][end if] on the floor to activate the pressurisation sequence."
	
Does the player mean doing something to an open airlock door:
	it is unlikely. 


Section - Rooms
	
The description of a room is usually "(UNDER CONSTRUCTION)".  
A room can be emergency powered, fully powered, or unpowered. 
A room can be pressurised or unpressurised. 
A room can be scored or unscored. 
A room is usually scored.


Chapter - New Kinds

[This chapter contains any new kinds]

Section - Body Parts

A humanoid is a kind of person. Yourself is a humanoid. 

A body part is a kind of thing. 

A head is a kind of body part.  A head is part of every person.

Definition: a body part is selfish if it is part of the player.

A left arm is a kind of body part.  A left arm is part of every humanoid.

A right arm is a kind of body part. A right arm is part of every humanoid.

A torso is a kind of body part. A torso is part of every humanoid.

A left leg is a kind of body part. A left leg is part of every humanoid.

A right leg is a kind of body part. A right leg is part of every humanoid.

Some feet are a kind of body part. Some feet are part of every humanoid. 

Some hands are a kind of body part. Some hands are part of every humanoid.

The description of  your head is "You see nothing special about [your head][if the helmet is worn], apart from the helmet you're wearing[end if]."

Instead of attacking a body part:
	say "Maiming yourself is not a great idea[if the player is in the infirmary and the auroscope is not handled], not in the long run anyway[end if]."


Section - Airlock button kind

An airlock button is a kind of device. 

Instead of examining an airlock button(called the target):
	if the target is switched off:
		say "It's a simple pressure switch controlling access to the [if the target is the outer airlock button][outer airlock door][otherwise][inner airlock door][end if], operated by standing on it.";
	otherwise:
		say "It's recessed and inaccessible.";

Instead of pushing an airlock button:
	try switching on the noun.

Does the player mean doing something to a switched off airlock button: it is likely.

Understand "step on [airlock button]" or "jump on [airlock button]" or "stand on [airlock button]" as switching on.


Section - Bunk

A bunk is a kind of supporter. A bunk is enterable scenery.

After examining a bunk(called target):
	if something handled is on the target:
		say "On the bunk lies [a list of handled things on the target].";
	otherwise:	
		continue the action.

Understand "double bunk/bed/bunks/beds" or "bed" or "beds" as a bunk.

Instead of searching a bunk(called target):
	try examining the target.


Section - Crewman's Locker

A crewman's locker is a kind of container. It is a closed openable locked lockable scenery. 

Understand "upright locker" or "lockers" or "upright lockers" as a crewman's locker.


Section - Chalky White Tablets

A chalky white tablet is a kind of thing. 
It is edible. 


Section - Fuses

A fuse is a kind of thing.


Section - Fuseboxes

A fusebox is a kind of container. 
It is usually closed, openable, and scenery.

Instead of inserting something that is not a fuse into a fusebox, say "It's a fusebox, not a suitcase."

Instead of inserting a fuse into an open fusebox(called the chosen fusebox):
	if a fuse is in the chosen fusebox:
		say "There's already [a list of things in the chosen fusebox] inside, there's no room for anything else.";
	otherwise:
		continue the action.
		

Section - Taps

A tap is a kind of device. 


After switching on a tap(called the chosen tap):
	now the flowing water is in the en-suite;
	say "You switch on the [chosen tap]."
	
Every turn when the flowing water is in the en-suite and all taps are switched off:
	remove the flowing water from play.

Does the player mean switching off a switched on tap:
	it is likely.

Does the player mean switching on a switched off tap:
	it is likely.

Section - Trunk

A trunk is a kind of container. It is closed, scenery and openable.


Section - Medical Locker

A medical locker is a kind of container. It is openable and closed.


Section - Locker

A locker is a kind of container. 
A locker is usually openable and closed. 
A locker can be explored or unexplored. 
A locker is usually unexplored. 
The description of a locker is "Dark green in colour and made of sheet steel, these are the last word in secure interstellar stowage. Each has a simple handle and lock.[if open] Currently open,[end if][if something is in the open locker] and inside [is-are a list of things in the locker][otherwise] and empty[end if]. " 
 
Understand "storage locker" as a locker.

Instead of searching a locker:
	try opening the noun.
	
Instead of pulling a locker:
	try opening the noun.
	
After opening a locker when no lockers are explored:
	now the noun is explored;
	say "The locker opens smoothly to reveal a dark interior, but very little else."
	
After opening an unexplored locker when exactly one locker is explored:
	now the noun is explored;
	say "This locker doesn't open as smoothly as the last, and you have to force it open using both hands. Sadly, it's just as empty though."
			
After opening an unexplored locker when exactly two lockers are explored:
	say "You open the locker casually, expecting it to be empty, but at the back you are surprised to find a mini fuel canister, which you take.";
	move the mini fuel canister to the location;
	silently try taking the mini fuel canister;
	now the noun is explored.


Section - Supporters

After examining a supporter(called target):
	if something handled that is not Bryan is on the target:
		say "[if more than one thing is on the target]Also on[otherwise]On[end if] the [target] [is-are a list of handled things on the target]. Right where you left [if more than one handled thing is on the target]them[otherwise]it[end if].";
	otherwise:
		continue the action.


Section - Props

A prop is a kind of thing. A prop is always scenery.


Section - Chair

A chair is a kind of supporter.
A chair is always enterable.
[Every chair allows seated.
A chair is usually seated.]
A chair has a chair_position.
The chair_position of a chair is usually normal.


Section - Bed

A bed is a kind of supporter.
A bed is always enterable.
[Every bed allows seated and lying.
A bed is usually lying.]


Section - Gas Cylinders

A gas cylinder is a kind of thing.
The description is "This is one of the gas cylinders which belong in the engine room.".

Understand "cylinder" or "gas tank" as gas cylinder.

After inserting a gas cylinder into the gas storage rack:
	change the cylinderCount to the cylinderCount + 1;
	say "You gently slide the gas cylinder into its slot and snap the nozzle into place with a satisfying clunk. You screw the fitting tight and it seems to be securely in place.

There [if the cylinderCount was greater than 0]are[otherwise]is[end if] now [cylinderCount in words] gas cylinder[s] in the gas storage rack.[if the cylinderCount is 4][line break]Well, that's all the cylinders in place. Now you just need to input the correct authorisation code onto the engine room control panel.".

After removing a gas cylinder from the gas storage rack:[This code doesn't seem to work for some reason but it's not necessary at the moment as I've blocked the player from taking the cylinders when they are in the rack]
	change the cylinderCount to the cylinderCount - 1;
	say "There [if the cylinderCount was less than 3]is[otherwise]are[end if] now [cylinderCount in words] gas cylinder[s] in the gas storage rack.".


Section - The spacesuit

Instead of looking under spacesuit:
	say "You can already see under your own spacesuit thank you very much -- you're in it."
	
Instead of searching the spacesuit:
	say "You search your spacesuit for any loose change, or spaceship repair kits, but find nothing."
	
Instead of smelling the spacesuit:
	say "You just smell stale sweat -- and fear."
	
Instead of buying the spacesuit:
	say "It's a little late for that. The galactic emporium that you stole it from is 12 000 light years away."
	
Instead of climbing the spacesuit:
	say "You try to climb the spacesuit -- you know, the spacesuit that you're inside but you get nowhere."
	
Instead of pulling the spacesuit:
	say "You've only been alone a short time. You're not that desperate yet."
	
Instead of opening the spacesuit:
	try taking off the helmet.
	
Instead of entering the spacesuit:
	say "Enter it? You're already in it, or hadn't you noticed."
	
Instead of getting off the spacesuit:
	say "You get off the spacesuit -- I mean...say what!?"
	
Instead of closing the spacesuit:
	say "Thankfully, it's already closed otherwise you'd be asphyxiating as we speak."
	
Instead of taking the spacesuit:
	say "You already have that -- you're wearing it."
	
Instead of switching on the spacesuit:
	say "Strange request but I'll allow it...the spacesuit is already switched on in that oxygen is currently flowing through it."
	
Instead of switching off the spacesuit:
	say "Switch it off? You mean stop the oxygen flow to your brain...that ain't a good idea."
	
Instead of attacking the spacesuit:
	say "You plant a left hook onto the inside of the spacesuit. And a right. Then a vicious uppercut; you've released some aggression but have achieved bubkiss."
	
Instead of touching the spacesuit:
	say "Done....you achieved nothing doing this."
	
Instead of rubbing the spacesuit:
	say "I know you're lonely..but keep your head in the game."
	
Instead of waving the spacesuit:
	say "You gently sway back and forth, which is the closest you come to waving the spacesuit but no one waves back."
	
Instead of squeezing the spacesuit:
	say "You try to find a way to get your arms outside of the spacesuit to give it a big hug (in important thing to attempt to do) but there's just no physical way to do so. Damnit! Just when you think you have the solution to all your problems there's always a catch."
	
Instead of burning the spacesuit:
	say "That'd be a precious waste of oxygen. Plus, being burned to death is horrible."
	
Instead of cutting the spacesuit:
	say "What and let all the oxygen escape. Not a good idea"
	
Instead of swinging the spacesuit:
	say "Rather than swing the spacesuit, you decide to swing you booty (or botty) to the funky groove inside your mind...seriously, stop attempting weird stuff. It's almost as creepy as providing descriptions for all these bizarre actions."
	
Instead of tasting the spacesuit:
	say "Hmmmm tastes like raspberry icecream.....flavoured EXACTLY like spacesuit!"
	
Instead of eating the spacesuit:
	say "Control yourself man, you ate a midnight snack less than an hour ago."
	

Section - The small statue

Instead of looking under the small statue:
	say "You try to lift up the statue to look under but a strange force seems to stop you."
	
Instead of searching the small statue:
	say "You look for some pockets on the snake to rummage through but don't find any."
	
Instead of smelling the statue when the helmet is worn:
	say "Just as you lift the snake up to your helmet, one of the snake heads stretches out at you, sinking its jaws onto your helmet. You throw the statue away in fright.";
	silently try dropping the small statue.
	
Instead of smelling the statue when the helmet is not worn:
	say "Just as you lift the statue up to your head to smell it, one of the snake heads stretches out and bites you on the nose. You shriek and struggle for a moment before pulling the statue off your nose and throwing it away from you. You hold your hands up to your nose, expecting to feel gushing blood but you feel nothing but a cold metal on your fingers.";
	silently try dropping the statue;
	
Instead of buying the small statue:
	say "It's too late to buy the statue now, you're already in possession of it. You often wonder how it got into your pocket in the first place though."
	
Instead of climbing the small statue:
	say "You seriously doubt Zod would appreciate that. In any case, the statue is only 4cm's high and wouldn't be a challenging climb."
	
Instead of pulling the small statue :
	say "You try pulling on the statue but it doesn't move, and the more you pull, the more a deep foreboding fear sweeps over you."
	
Instead of opening the small statue:
	say "You pull on the snake heads, thinking that the statue might open to reveal a secret map, or poison, or sparkling jewel but it doesn't open. And Zod seems to be getting angrier."
	
Instead of entering the statue:
	say "You wonder if the statue is actually a portal to another world. You think that it actually probably is, but the world behind the Zod is almost certainly one that you'd never want to visit anyway."
	
Instead of getting off the statue:
	say "You can't get off what you're not on -- please don't take this as an invite to try getting on the statue, it's not. It's merely a polite rejection."
	
Instead of closing the statue:
	say "If the statue is indeed openable, then it's already closed."
	
Instead of switching on the statue :
	say "You try pulling on the heads which would presumably be the levers to activate the statue if it was switch-onable, but nothing happens. And for a moment, you're glad about that."
	
Instead of switching off the small statue :
	say "Unless you can switch the statue on, you're not going to be able to switch it off."
	
Instead of attacking the small statue:
	say "You swing at the statue with your fist but just as you make contact a sharp pain runs up your arm all the way to your head. You collapse, face twitching, body quivering and slowly black out.";
	change the saved location to the location;
	move the player to unconscious-land, without printing a room description.
	
Instead of attacking the small statue for the second time:
	say "After what happened last time, no thanks."
	
Instead of doing something other than waking up when the player is in unconscious-land:
	say "Blackness is all that you can interact with at the moment."
	
Instead of waking up in unconscious-land:
	say "You somehow manage to find the light.";
		let time elapsed be a random number between 25 and 50;
		decrease the oxygen level by time elapsed;
		move the player to the saved location.
	
Instead of touching the small statue:
	say "You hold your finger out to touch the statue but the closer you get the worse you start to feel. You quickly touch the statue with the tip of your finger."
	
Instead of rubbing the small statue:
	say "You don't want to see the kind of genie that would come out of here. Probably a giant snake with two heads."
	
Instead of waving the small statue:
	say "You wave the statue as if holding offering the statue up to Zod himself."
	
Instead of squeezing the small statue:
	say "You squeeze the statue. You breathing starts to feel tighter. Still curious though, you squeeze some more. Your breathing gets even tighter. You stop squeezing the statue; that was weird.";
	let oxygen lost be a random number between 10 and 25;
	decrease the oxygen level by oxygen lost.
	
Instead of burning the small statue:
	say "Not even the fire's from Orgon 1 could melt this statue."
	
Instead of cutting the small statue:
	say "You'd rather not. That'd only serve to make Zod angry."


Chapter - Darkness

Rule for printing the announcement of darkness when closing a container which contains the player: 
            say "[one of]Congratulations, brainiac: now you can't see a thing.[or]You have become the first human to volunteer to try out sardine living.[or]So this is what a baked bean feels like...[or]Some people wonder where the expansive relative space and time of the TARDIS is compensated for in the universe. It is this container - the anti-TARDIS, or for the less pc, the re-TARDIS.[or]Somebody shouts, 'Bring out The Gimp!'. You pretend to be asleep.[at random]" instead. 

Rule for printing the description of a dark room: say "[one of]Your eyes can barely make anything out.[or]It's so dark, when you blink things get momentarily brighter.[or]It's so dark a lighthouse would be worried.[or]It's more than dark. It's DARK.[or]It's darker than an attention-seeking male art student's eyeliner.[or]It's so dark, even a bat would give this room a miss.[or]The darkness is so absolute, you could cut a slice of it and wear it like a hat.[or]They say dark is the absence of light. Well the light in this room is so absent it hasn't been seen for 10 years since the darkness was born. In fact, the light is shacked up somewhere near Bournemouth with a marriage wrecker called Mandy, and only occasionally sends a Christmas card.[or]The darkness in here is so thick you can taste it.[or]It is so dark in here, it is like someone has taped your eyes shut, put a bag over your head and then put you inside a Marmite jar.[or]The darkness is so absolute, it's like french kissing Sylvia Plath.[or]There are no photons in here.[or]The darkness is not oppressive, oppression is for those with insecurity; this darkness is complete, it nods and smiles politely at everything you say.[at random]" instead.


Chapter - Default Rejection Messages

[ANSWER]

First report an actor answering something that:
	say "[one of]You hear nothing except the sound of your own breathing.[or]No reply; it seems your invisible friend isn't talking to you.[or]You're in Space! If they can't hear you scream, they certainly can't hear that![or]'Goddamn it Jim, I'm a game, not a computer!'[at random]" instead.
	
[ATTACK]

First check an actor attacking:
	say "[one of]Violence isn't the answer to this one.[or]Whatever you were attacking made its saving throw. You lose 5 seconds of your existence.[or]Mastering all your ninja skills, you launch a devastating attack... And fail miserably.[or]Mustering up your pirating abilities, you head towards your target... And do nothing but say 'Arrr!'[at random]"instead. 
	
[BLOW]

First check an actor burning something:
	say "[one of]This dangerous act would achieve little.[or]There is no oxygen here to burn anything.[or]Many things are possible in a spacesuit, but operating a Zippo just isn't one of them.[or]Fire Bad.[or]It would be foolish to waste oxygen on an operation which would (I can confidentially assure you) move you no closer to repairing your stricken vessel.[at random]" instead.
	
[BUY]
	
Buying vaguely is an action applying to nothing.

Understand "buy" as buying vaguely.
	
Check an actor buying vaguely(this is the block buying vaguely rule):
	say "[one of]Nothing is on sale.[or]You are all alone on a spaceship in, as far as you can discern, the absolute centre of nowhere. Not only are there no shops, but the intergalactic hypermarkets, famed as they are for rapacious expansion (even swallowing small systems just for additional convenient spaceship parking), have no papers submitted with the appropriate planning authorities to build anything anywhere near here between now and the end of eternity. There is, you can be sure, nothing to buy.[or]You must have left your wallet in your other spacesuit.[or]Your money is no good here.[or]With what?[at random]" instead.
	
[CLIMB]

First check an actor climbing:
	say "[one of]I don't think much is to be achieved by that.[or]After several failed attempts, you ponder what could be achieved by climbing here. You realise that the answer is 'nothing', and so you resolve to approach the problem another way.[at random]" instead.

[CUT]

First check an actor cutting something:
	say "[one of]Cutting that up would achieve little.[or]Cutting that won't quell the bloodlust.[or]What? Are you an emo kid or something?[at random]" instead.
	
[DIG]

Understand "dig" or "dig [text]" as a mistake ("[one of]Digging would achieve nothing here.[or]You'd have to have a pretty powerful shovel to dig through this spaceship's hull.[or]Nobody else would be interested in this webpage.[or]Oh you dig. You dig real heavy. Unfortunately, your spaceship's still knackered.[at random]").

[DRINK]

First check an actor drinking:
	say "[one of]There's nothing suitable to drink here.[or]Your spacesuit's moisture recycling unit provides all the water you need. If nothing else, the taste is enough to stop you feeling thirsty.[or]Hitting the bottle so soon?[or]Planetside, drinking [italic type]is[roman type] the answer to everything. Here, not so much.[at random]" instead.

[EATING]
	
Check an actor eating something inedible:
	say "[one of]That's plainly inedible.[or]You may be sick to death of freeze-dried space ice cream, but really, that's plainly inedible.[or]That object is as inedible as coriander. And you detest coriander.[or]While it may be true that you are hungry, it's success for which you starve. As such, oral administration is unlikely to quell the urge that you feel.[at random]" instead.
	
[JUMPING]

First check an actor jumping:
	say "[one of]You jump on the spot, fruitlessly.[or]You jump up, floating both feet to the roof where you you hit your head and bounce back to the floor.[or]You jump on the spot, enjoying the new heights you can reach out here in space. Sadly the distraction does nothing to help your predicament.[or]You leap into the air, your suit catches on the wall, and you find yourself performing a balletic mid-air pirouette right back to where you started from.[at random]" instead.
	
[KISS]

First check an actor kissing:
	say "[one of]Keep your mind on the game.[or]You bend forward planting your lips on the inside of your helmet.[or]Your lips touch the fiberglass of the helmet. Fiberglass does not taste good.[at random]" instead.
	
[LISTEN]
	
First check an actor listening:
	say "[one of]You hear nothing unexpected.[or]You hear nothing but the clunk clunk of far off machinery, punctuated by the occasional mechanical wheeze (which is worrisome as you're not supposed to be able to hear anything outside your suit).[or]You helmet echoes faintly with the sound of the sea, as if you were holding a seashell to your ear. You sigh wistfully, remembering your favourite beach back on planet Zorg.[or]No sound can travel outside your suit. The extreme silence however, amplifies your every step, every breath right down to your every heartbeat to deafening levels.[at random]" instead. 
	
[LOOK UNDER]

First check an actor looking under:
	say "[one of]With great difficulty you manoeuvre yourself down peek underneath, your suit rendering this apparently simple action almost unbearably complicated. After much swearing you finally get a good look... There's nothing there.[or]You find some mauve dust, but, mindful of your health and safety training, you decide not to touch it.[at random]" instead.
	
[PRAY]

Praying is an action applying to nothing. 

Understand "pray" as praying.

Check praying:
	say "[one of]Nothing practical results from your prayer[or]Much like this text adventure, a higher power has already set your destiny and your prayers will change nothing.. best crack on.[or]Your prayer has been answered! The answer is [one of]'Compiler error: line 34.56'[or]'A suffusion of yellow'[or]'42'[or]'Outlook So-So'[or]'No'[at random][at random]."; stop the action.
	
[SING]

First check an actor singing:
	say "[one of]Your singing is abominable.[or]For a precious moment, the [if the helmet is worn]stifling silence[otherwise]dull thunk of far-off machinery[end if] is [if the helmet is worn]broken[otherwise]overpowered[end if] by your angelic voice.[or]Karaoke night just isn't the same without the rest of the crew.[or]In space, no one can hear you sing. Thankfully.[or][one of]You casually utter a few notes of Ave Maria, and repent as the sound is amplified to cacophonous intensity by your helmet.[or]Uh-uh. Your ears have had enough Mozart for today.[stopping][or]Please don't.[at random]" instead. 

[SLEEP]

First check an actor sleeping:
	say "[one of]You aren't feeling especially drowsy.[or]If you really want to sleep, go back to your quarters.[or]Ah, sleep. There would be no waking if you do, though.[or]You close your eyes for a fraction of a second, and one of the few serviceable systems on board the spacecraft - the auto-stasis generator - kicks into action. When you awake, a thousand and twenty-four years of Earth time have passed, the spaceship is still kaput, and you don't feel any less tired.[at random]" instead.
	
[SMELL]

First check an actor smelling:
	say "[one of]You smell nothing unexpected.[or]It's really not advisable to take off your helmet when there's no oxygen in the ship.[or]Ugh! You smell astronaut in spacesuit. Probably should clean this suit more often.[or]It smells like sweat. Yours.[or]You recall a story about a dog with no nose.[or]Mmmmm. It smells like.. spacesuit, recycled breath and.. urine?![at random]" instead.

[SWIMMING]

Swimming is an action applying to nothing. 

Understand "swim" as swimming.

Check swimming:
	say "[one of]There's not enough water to swim in.[or]In space? You flail your arms and legs around for a while and feel very silly.[or]You make swimming motions in the air. You chuckle quietly to yourself, this would be funnier with the crew here.[at random]" instead. 
	
[SWING]

Understand "swing" as a mistake ("[one of]There's nothing sensible to swing here.[or]You need to be married first. And own a hot-tub.[or]Looks like you forgot the keys to your spaceship. Oh well. Next time.[or]You break into an uproarious rendition of 'La Mer'. Bobby Darin would be delighted if he was here with you, helping you fix a broken spaceship. As it is, wherever he is, you can guarantee he's having a better time than you are right now.[at random]").

[THINK]

First check thinking:
	say "[one of]What a good idea.[or]After a moment's contemplation, the solution is clear.[or]Thinking just wastes valuable oxygen. This is a time for action![or]Most of the oxygen you inhale goes to your brain. It better be worth it.[or]You think for a while. After a while, you forget what you were thinking about. Then you think about trying to remember it. After a while you realise that thinking hasn't helped you in this situation - perhaps you'd better try something else.[at random]" instead.
	
[WAIT]
	
First check waiting:
	say "[one of]Nothing happens.[or]You die a little inside.[or]Space is timeless. An hour passes. Or was it a minute?[or]The little time imps just stole five precious minutes of your pathetic life. I hope you're proud.[or]
While you wait, some very significant events occur. None of them affect your situation in the slightest though - so will you please DO SOMETHING.[at random]" instead.

[WAKE]

First check waking up:
	say "[one of]The dreadful truth is, this is not a dream.[or]Last time you woke up, you were stranded in deep space with no atmosphere and no hope of rescue. You're not keen to try it again.[or]You open your eyes to find you are still here and nothing has changed.[or]You can't shake the feeling of claustrophobia. Claustrophobia in space! This is no dream, for sure.[or]After trying various techniques (pinching yourself and so on), all with no success, you decide that even if this is a dream, you'd better make the best of the situation.[at random]" instead.
	
[WAKE OTHER] 

First check an actor waking:
	say "[one of]That seems unnecessary[or]Let sleeping dogs lie. Wait, is it a dog? I wasn't really concentrating.[at random]" instead.
	
[WAVE HANDS]

First check an actor waving hands:
	say "[one of]You wave, feeling foolish.[or]You just don't care with your hands in the air! Or, y'know, vacuum.[at random]" instead.
	
[NEW VERB REJECTIONS]

Understand "cry" as a mistake ("[one of]You try to cry but the lack of gravity means that the tears just create a thick film over your eyes which temporarily blinds you.[or]Waaaaah! Waaaaah! My ship's buggered! I'm likely to die! And all I want to do is sit in a puddle of self-pity instead of saving myself! Waaaaah![at random]").

Understand "piss" as a mistake ("The spacesuit absorbs your urine.").

Understand "shit" as a mistake ("The spacesuit takes care of your 'business'.").

Understand "arse" as a mistake ("It's fun to swear!").

Understand "fart" as a mistake ("You smell something very, very wrong in your spacesuit.").

Understand "moan" as a mistake ("Life is just one long trauma for you isn't it.").

Understand "trouser" as a mistake ("There is nothing here to trouser.").

Understand "kill" as a mistake ("[one of]You already have twelve ASBOs.[or]There's no-one to kill. Fix the spaceship, get to Nineteen, and then Mr Crowbar will dance in the red puddle of peace.[at random]").

Understand "stroll" as a mistake ("Your strolling days are over.").

Understand "mince" as a mistake ("You tried mincing once and look where it got you.").

Understand "canter" as a mistake ("[one of]You make a cantering noise but don't move. You feel less self-assured.[or]Can't. No coconuts.[at random]").

Understand "tune" as a mistake ("[one of]There is no fork.[or]'The Safety Dance', by Men Without Hats. Tune![at random]").

Understand "dump" as a mistake ("The dump-hole looks unsanitary.").

Understand "creep" as a mistake ("[one of]You try to creep but you are too oafish.[or]Sorry, but you are [italic type]not[roman type] a weirdo.[at random]").

Understand "scale" as a mistake ("[one of]You try to make it bigger but it just won't grow.[or]Do, re, mi, fa, so, la, ti, do![or]You need 500 more rupees to afford the zora's scale.[at random]").

Understand "cock" or "cunt" as a mistake ("Sadly, the spacesuit makes masturbation impossible.").

Understand "run" as a mistake ("Just assume that all future interactions between yourself and the game happen a bit quicker.").

Understand "walk" as a mistake ("Which way?").[!]

Understand "xyzzy" as a mistake ("There are no mines in this location.").

Understand "plugh" as a mistake ("A hollow voice says 'what you talkin bout Willis?'")


Chapter - Locale priorities

[rule for not listing things on scenery supporters in the initial descriptions as well as in the main descriptions.]
The describe what's on scenery supporters in room descriptions rule is not listed in any rulebook.


Chapter - Reachability

A rule for reaching outside an open container(called target):
	say "You'd need to get out of the [target] first.";
	deny access.
	
A rule for reaching outside a supporter(called target):
	say "You'd need to get off the [target] before you can do that.";
	deny access.


Chapter - Take all

[This prevents the player from trying to take scenery objects with a 'take all' ]
Rule for deciding whether all includes scenery: it does not. 
	
Rule for deciding whether all includes the not handled aspirin box:
	it does not.
	
Rule for deciding whether all includes not seen bryan:
	it does not.


Chapter - Repeated Text Substitutions

Section - Ship Status

To say ship status:
	say "[fixed letter spacing]Gravity - Operational [line break]Hull Integrity - [if fixing the hull breach has ended]Stable[else]Breach in the starboard cargo hold[end if][line break]Atmosphere - [if Repressurising the ship has ended]Nominal[else]Vacuum[end if][line break]Engines - [if repairing the engines has ended]Operational[else]Inoperable[end if] [line break]Power - [if fixing the generator has ended]Standard[else]Limited to top deck[end if] [line break]Plumbing - Uncertain[escape pod message][variable letter spacing][if repairing the engines has ended][paragraph break]Looks like all your DIY repairs have worked.[line break]Best restart the engines using the navigation terminal and get moving again.[end if]".

To say escape pod message:
	say "[if red-pod button is switched on and the location of the player is the Captain's Quarters][paragraph break][fixed letter spacing]Escape Pod status override sequence is '[bold type]P[roman type]od [bold type]O[roman type]verride [bold type]G[roman type]iven [bold type]R[roman type]eadily'.[variable letter spacing][end if]".


Section - Attack Results

To say attack-strength:
	say "[one of]vicious[or]fierce[or]ferocious[or]malicious[or]spiteful[or]wild[or]pathetic[or]miserable[or]pitiful[at random]".

To say attack-type:
	say "[one of]attack[or]assault[or]walloping[or]thrashing[or]trashing[or]clouting[or]smiting[as decreasingly likely outcomes]".

To say attack-effect:
	say "[one of]hardly[or]barely[or]scarcely[at random]".

To say attack-result:
	say "[one of]even scratches[or]dents[or]makes an impression in[or]dints[as decreasingly likely outcomes]".


Section - Random Title

To say random-title:
	say "[one of]sir[or]mr[or]mr T[or]madame[or]missus[or]matron[or]you beatnik[at random]".


Section - Death Messages

To say yourDead:
	choose a random row in the Table of Death Messages;
	say "[message entry]".

Table of Death Messages
message
"You die. Let's see what you could have won... WOW! A top of the range speedboat! Tough luck... "
"Your death makes you the weakest link. Goodbye"
"Death is not the end. Oh, sorry, yes it is. You're Dead. The End"
"You died. Actually, can I just break the fourth wall for a minute here? You didn't die. You probably know this. When I say 'you' here, I mean the nonexistent avatar we've both accepted as a way for you to relate to, and interface with, this game. Whatever. You screwed up. I hope you saved!"
"Pwnd by a text adventure, way to go!"
"GAME OVER, MAN, GAME OVER!"


Section - Asphyxiation Messages

To say youAsphyxiate:
	choose a random row in the Table of Asphyxiation Messages;
	say "[message entry]".

Table of Asphyxiation Messages
message
"As your last breath escapes your blue, oxygen-deprived lips, you faintly hear the opening strains of Strauss' Also Sprach Zarathustra"
"As your last breath escapes your blue, oxygen-deprived lips, you faintly hear the opening strains of Technotronic's Pump Up The Jam. Strange. Hell is real"
"You die. Let's see what you could have won... WOW! A top of the range speedboat! Tough luck... "
"Your death makes you the weakest link. Goodbye"
"Asphyxiation is not a painless way to go. You seem to have run out of alternatives, though"
"Death is not the end. Oh, sorry, yes it is. You're Dead. The End"
"You died. Actually, can I just break the fourth wall for a minute here? You didn't die. You probably know this. When I say 'you' here, I mean the nonexistent avatar we've both accepted as a way for you to relate to, and interface with, this game. Whatever. You screwed up. I hope you saved!"
"Pwnd by a text adventure, way to go!"
"Sadly, man needs two things to exist. Pringles and air to breathe. You're fresh out of potato chips. Fresh out of oxygen. And fresh out of luck"
"Your lungs have written a stern letter of complaint to your brain due to the total absence of oxygen being provided to them after a series of disastrous and entirely dumb decisions. Rest assured, that it is only death that will avoid your brain being sent to court for this"
"No oxygen. You have a feeling you're about to re-enact the ending sequence of Total Recall. You hope you can die with dignity, and don't end up the governor of California"
"The lack of oxygen normally leads to a horrible death. In this case, sadly, you appear to be normal"


Section - Win Messages

To say youWin:
	choose a random row in the Table of Win Messages;
	say "[message entry]".

Table of Win Messages
message
"[one of]This was a triumph. I'm making a note here: Huge success.... [or]Congratulations, let's see your prize... WOW! A classic caravan circa 1972![or]ZOMG GRATZ[or]You have finished our game!!! Hope you enjoyed[at random].".


Part - Initialisation

Chapter - Starting Conditions

When play begins:
	now all rooms in the middle_deck  are unpowered;
	now all rooms in the bottom_deck are unpowered;
	now all unpowered rooms are unlit;
	now all rooms in the Top_Deck are emergency powered.


Chapter - Introduction

[The following quotations are from this page: http://textadventure.org.uk/index.php?title=Spaceship:Opening_Quotations&oldid=4879]

[The introduction is from here: http://textadventure.org.uk/index.php?title=Spaceship:Introduction&oldid=4316]

When play begins:
	say "[randomQuote]";
	say "[bold type][story title][roman type][line break]";
	say "[story headline][line break]";
	say "by [story author][line break]";	
	say "[italic type]http://www.guardian.co.uk/technology/gamesblog[roman type]";
	say paragraph break;	
	say "[roman type]The aim was simply to create the greatest group-generated text adventure in the world ever. This game is released under the GNU General Public License v3. Type [bold type]license[roman type] for details. For more project info, please visit:[paragraph break][bold type]http://barrymars.co.uk/spaceship/index.html[roman type]";
	say line break;
	say line break;
	center "Press any key to begin";	
	wait for any key;
	clear screen;
	say "The alarm sounds and you're moving before you even notice the shrill whine. You've gone through hundreds of these decompression drills and the movements required are pretty much routine: move the arms, put the torso on, seal yourself in and done! Now, just wait for the all-clear signal that sends you back to bed and the dream about... something, there was a parade, wasn't there?

A few seconds pass. Something's wrong - the all-clear should have sounded by now. The alarm, muffled by the spacesuit, is quieter but still there... and is there some hissing also? What's going on?

The sounds suddenly stop. You notice your heavy breathing, the only audible thing on the ship. The alarm lights are still flashing, though. The realisation snaps you fully awake: no drill. The ship has decompressed: all atmosphere has escaped. If not for your quick reaction to the alarm, you would be dead. A quick check of your spacesuit: all systems nominal, oxygen full: enough for 48 hours. Pity you're four days away from Nineteen. A quick glance out the porthole reveals the engines have stopped. You're stuck, alone, adrift in the middle of space in a leaky ship, 4 days away from help, with 2 days of air.

This [italic type]must[roman type] be a Thursday.".

To say randomQuote:
	if a random chance of 1 in 8 succeeds:
		display the boxed quotation
		"There is seldom so much perfection
		in works composed of many separate
		parts, upon which different hands
		had been employed, as in those
		completed by a single master.
		-- Rene Descartes";
	otherwise if a random chance of 1 in 8 succeeds:
		display the boxed quotation
		"A human being is the best computer
		available to place in a spacecraft...
		It is also the only one that can be
		mass produced with unskilled labor.
		-- Werner von Braun";
	otherwise if a random chance of 1 in 8 succeeds:
		display the boxed quotation
		"A common mistake people make
		when trying to design something
		completely foolproof is to
		underestimate the ingenuity of
		complete fools.
		-- Douglas Adams";
	otherwise if a random chance of 1 in 8 succeeds:
		display the boxed quotation
		"Many hands make light work.
		-- proverbial";
	otherwise if a random chance of 1 in 8 succeeds:
		display the boxed quotation
		"I put up my thumb and shut one eye,
		and my thumb blotted out the planet
		earth. I didn't feel like a giant.
		I felt very, very small.
		-- Neil Armstrong";
	otherwise if a random chance of 1 in 8 succeeds:
		display the boxed quotation
		"To be the first to enter the cosmos,
		to engage, single-handed, in an
		unprecedented duel with nature --
		could one dream of anything more.
		-- Yuri Gagarin";
	otherwise if a random chance of 1 in 8 succeeds:
		display the boxed quotation
		"It's a very sobering feeling to be up
		in space and realize that one's safety
		factor was determined by the lowest
		bidder on a government contract.
		-- Alan Sheperd";
	otherwise:
		display the boxed quotation
		"Space may be the final frontier, but
		it's made in a Hollywood basement.
		-- Red Hot Chilli Peppers";
	show the current quotation.

After printing the banner text:
	say line break;
	say "[italic type]For help with playing Spaceship, or some hints in case you get stuck, please type [bold type]help[italic type]. If you would like to close the inventory and/or cover artwork windows, please type [bold type]toggle[italic type].[roman type]";
	say line break.


Part - Helping the player

Chapter - Redirecting the player after trying to go somewhere in a room

Understand "go to [a thing]" as a mistake("In this game you only need the commands fore (or the abbreviation f), aft (a), starboard (s), and port (p) to travel around the different rooms of the game world. Walking to up specific objects is not needed to interact with them.")


[Chapter - Telling the player that Spaceship uses shipboard directions

After reading a command when the player is not shipboard-aware:
	if the player's command matches "s":
		say "[italic type]Going aft -- remember that Spaceship! uses the shipboard directions of fore (f), aft (a), port (p), and starboard (s) instead of regular compass directions.[roman type][line break]";
		
A person can be shipboard-aware. The player is not shipboard-aware.

Before going a direction when the player is not shipboard-aware:
	now the player is shipboard-aware.]


Chapter - Redirecting the player on asking a question

[This redirects the player if they try to ask questions and is lifted from an example in the Inform7 user manual]

 Understand "who" or "what" or "when" or "where" or "why" or "how" or "who's" or "what's" or "when's" or "where's" or "why's" or "how's" as "[query]". Understand "[query] [text]" as a mistake ("[story title] understands commands, such as '[command prompt]examine [a random thing that can be seen by the player]', but not questions. For more instructions, type HELP."). 


Chapter - Help Menu

[This code uses the menus extension by Emily Short to implement a help menu]

Understand "help" or "hint" or "hints" or "about" or "info" as asking for help. 

Asking for help is an action out of world. 

Carry out asking for help:  
	change the current menu to the Table of Options;
	carry out the displaying activity;
	clear the screen;
	try looking. 


Section - Top Level Menu

Table of Options
title	subtable		description		toggle
"About [story title]"	--	"Spaceship is a collaborative project by the creative hivemind of Guardian gamesblog's community.

I had been looking for a way to capture the creativity of the talented folks who tune in to our daily posts when I discovered Penguin Publishing's 2006 Wiki novel experiment, One Million Penguins. Around the same time, I accidentally attended a coding dojo, where I was introduced to Inform6, a text adventure programming language that was literally so easy to use that even a codingphobe like myself could grasp it and make something beautiful.

And thus the wikigame was born.

I put out cautious feelers into the community to see if anyone would be willing to dive in, and was almost immediately overwhelmed by the number of people trying to get on board. The result of that sprawling and ambitious first attempt at collaborative game making was Contamination!, a dystopic horror set in modern day rural England.

After taking a short break and reassessing some of the peaks and troughs of that project, our second project was born.

Spaceship! is that baby. And now, we implore you: fix the engine or die.[paragraph break]Aleks Krotoski


[italic type]Please send any feedback or bug reports to wikicoders@gmail.com[roman type]"	--
"How To Play"	Table of Basic Instructions	--	--
"Hints"	Table of Hints	--	--
"Credits"	--	"Inform7 is the work of Graham Nelson and Spaceship! was compiled using the Linux, Windows and the Mac OSX compilers by P.F. Chimento, Andrew Hunter and David Kinder. Special thanks also go to Emily Short for her contributions to Inform7 and educational blog.

The wikigame concept was envisaged by Aleks Krotoski and Bambino Tostare, and the hosting for the project wiki was provided courtesy of StatusJones.

The original idea for Spaceship! was conceived by Phillip Walters. Cover art was provided by Ed Sludden of Switchpilot.

Spaceship! was programmed by Craig 'DennisChow' Davies, Barry Tucker, Michael Brunton-Spall, Perrin Ashcroft, Dave Chapeskie and Christopher T Miller.

Testing and feedback was provided by Aleks Krotoski and her mum, Bridget Dack, Simon 'Limni' Beck, Ian 'ShowMeDo' Ozvwald, Javri, John Collier, and Richard Bos.

Spaceship! was created thanks to contributions, writing and creative input of the following people :

Phillip Walters, DennisChow, Perrin Ashcroft, Simon 'Limni' Beck, Hambargarz, Tin Robot, Camax, Cavalcade, Fantomex, Weefz, MeepMeep, Nybble,  Alobster, Colonel Kilgore, Daf, Jim Pooley, Jumble Jumble, Jetamo, StatusJones, CunningStunt, HiddenAway, Apocalypse Cow, Andy Hill, Andy Borley, Adam Crowe, Charles Ullman, Elsa, Illuminant, Kerry Turner, Machineisbored, Trevver T, SonofSaito, Mitoto, SalubriousOne, Senor Monkfish, The Selfish Giant, Unpremeditated, Zoobaba

Many, many thanks also go to the anonymous contributors to the project wiki for making the wikigame what it is."	--


Section - Save/Restore Help

To say saveRestoreHelp:
	say "The following commands can be used so you don't have to work through our game in a single sitting:[paragraph break]Type SAVE to save your current progress.[line break]Type RESTORE to restore a previously saved game.[line break]Type RESTART to start the game all over again.[line break]Type QUIT to end your current game".


Section - Table of Basic Instructions

Table Of Basic Instructions
title 				subtable		description		toggle
"Basic Instructions" 		--		"[Basic Instructions]"	--	
"Moving from place to place"	--		"[Moving Place To Place]"	--
"Using Objects"			--		"[Using Objects]"	 	--
"Saving and other game options"	--		"[Saving Options]"	--

To say Basic Instructions:
	say "Spaceship! is a work of interactive fiction. You play the role of Captain of The Mighty Atom. You can guide the Captain through the game world by typing instructions into the command prompt (the command prompt is the > symbol at the bottom of your screen.) Some common instructions that you might need to use are the verbs [bold type]look[roman type], [bold type]examine[roman type], [bold type]take[roman type], [bold type]drop[roman type], [bold type]open[roman type], and [bold type]close[roman type]. Verb instructions like these can be combined with nouns and prepositions allowing the player to attempt many things, for example:

[bold type]take statue[line break]put spanner on bed[line break]open cabinet[roman type]

Instructions needn't be as simple as the ones above though and can get more complex, for example:

[bold type]type 53634 onto control panel[line break]combine the towel with the microwave[line break]fire the harpoon gun at Commander Suze[roman type].".

To say Moving Place To Place:
	say "One of the most important verbs you need to use in Interactive Fiction is [bold type]go[roman type]. Go is used in conjunction with a direction in order to move the protagonist from location to location (or from room to room.)

Traditionally, interactive fiction uses the eight compass directions of [bold type]north, northeast, east,[roman type] and so on in addition to the vertical directions of [bold type]up[roman type] and [bold type]down[roman type] to allow the player to travel around the game world. Spaceship! is a little different and rather aptly uses the shipboard directions of [bold type]fore, aft, port,[roman type] and [bold type]starboard[roman type] (plus [bold type]up[roman type] and [bold type]down[roman type]) instead.  In some cases, you may also find the commands [bold type]in[roman type] and [bold type]out[roman type] useful as well.

If at any time you are unsure what exits or directions are available to you, you can take a glance at the handy compass rose in the top-right corner of your screen which lists all the available directions of the exits in a room. Here is an example of how to use go:

[bold type]go aft[line break]go in[line break]go starboard[line break]starboard [line break]st[roman type]  

Notice in the above example that the verb [bold type]go [roman type]can be omitted and that the shipboard directions can also be abbreviated to a single letter to aid ease of use.".

To say Using Objects:
	say "Objects play a major role in works of Interactive Fiction. Throughout playing Spaceship! you will no doubt [bold type]take[roman type] many different objects. To see exactly what objects you have in your possession you can type [bold type]inventory[roman type] (or [bold type]i[roman type] for short) and a list of all your possessions will be displayed. To drop an item in your possession you can also type [bold type]drop[roman type] followed by the name of the thing you want to drop.

You can attempt to manipulate these objects in many different ways. Some ways common to most works of IF are [bold type]open[roman type], [bold type]close[roman type], [bold type]eat[roman type], [bold type]lock,[roman type] and [bold type]unlock[roman type]. There are also some less common ways to handle objects such as [bold type]cut[roman type], [bold type]spray[roman type], [bold type]squirt[roman type] and many more. Don't be afraid to experiment with new verbs.".

To say Saving Options:
	say "If at any time you want to save your position in a game you can use the commands [bold type]save[roman type] and [bold type]restore[roman type] to do so. Typing [bold type]save[roman type] will record your position in the game to a file on your computer which can later be reloaded by typing [bold type]restore[roman type].[paragraph break]You can also choose to restart or quit the game at any time by using the commands [bold type]restart[roman type] and [bold type]quit[roman type].[paragraph break]Another command you may find useful is [bold type]undo[roman type], which can be used to undo the very last move that you made.[paragraph break]To cycle through 3 different arrangements of the main, inventory, and cover artwork windows you can type [bold type]toggle[roman type]."


Section - Hint Sub Menu

Table of Hints
title	subtable		description	toggle
"Location Specific Hint"	--	"[locationhint]"	--.


Section - Location Specific Hints

To say locationHint:
	sort the Table of Location Hints in used order;
	repeat through the Table of Location Hints:
		if the location entry is the location of the player:
			say "[line break][hint entry]";
			increase used entry by 1;
			rule succeeds;
	say "[line break]There are no hints available for this room.".

[table of location specific hints (the 0 on the end of each row is VERY important)]
Table of Location Hints
location			hint		used
airlock			"So you want to do some Extra Vehicular Activity? Grab the EVA pack (but make sure you have all the right parts) and head outside."	0
armoury			"Harpoon gun's are great for reeling in catches and pacifists are big on extermination."	0
bridge			"Engines ignite at the flick of a button."	0
captain's quarters	"I bet you're getting frustrated enough to just [italic type]hit[roman type] something, aren't you? Go with this feeling. Seek out the hard metal instrument you need to cause the most destruction. And then maybe rummage around in the chaos you created."	0
captain's quarters	"Fuses are famous for their interchangeability."	0
crew's quarters		"Chief engineer Tyler long ago shelved plans for a joystickless EVA pack."	0
crew's quarters		"If you know the difference between Sci-Fi and SF, then you don't need a hint."	0
crew's quarters		"Buttons aren't only found on machines."
en-suite			"Unless you are a noodle armed choirboy, plungers can be unstuck with a simple pull."	0
en-suite			"Hydroelectricity needn't cause you any distress. It can be a wonderful source of power."	0
engine room		"Missing cylinders can really ruin the atmosphere."	0
engine room		"Technical numbers are best written down and locked away safely."	0
escape pod room		"Any good captains knows that sometimes you've just gotta follow orders as requested."	0
escape pod room		"When things start getting too absurd, that's the time to get pyromaniacal."	0
generator room		"Unblocking clogs in the generator is demeaning work for a Captain, this should be Bryan's job. I wonder where he is?"	0
generator room		"The way I see it, you have two options - you could either push whatever it is blocking the pipe down using any number of items in your inventory, or you could pull it out using a cleverly-fashioned wire hook made from a hanger."	0
infirmary			"That medical pod's great for finding what ails you - but at the moment, apart from a galactic-sized world-weariness, you're a perfectly healthy captain. Take a look around to see if there's anything organic that might be lying around that would be useful."	0
infirmary			"Diagnosing injuries can be a time consuming process."	0
Infirmary			"It's not just doctors who use stethoscopes."	0
infirmary			"Cracking safes isn't that hard. All it takes is the ability to listen, and a good ear."	0
kitchen			"You remember one of Chef Hudson's less glorious recipes. It was called 'Space Putty Surprise' and consisted of a large block of putty heated up in the microwave until gloopy."	0
outer space bottom	"This beast is broken. Thankfully you won the MacGyver prize in secondary school for your impressive ability to fix anything with the materials to hand. I believe I saw a malleable tray in the kitchen, a hammer in the janitor's cupboard and a canister of a  foamy-like substance in one of the cargo holds. Hey - it was good enough for your TV hero. Surely it's good enough for you?"	0
port cargo hold		"Mysterious boxes aren't meant to be clamped down. They should be set free."	0
starboard cargo hold	"That hull plate is tantalisingly close. If only you could just reach it with a piece of string and a projectile that can grab fast... May I suggest you play the part of Captain Ahab to its Moby Dick and get yourself some suitable weaponry? Like a harpoon? And a plunger?"	0
Top deck fore corridor	"Retinal scanners find it hard to function behind a sheet of glass."	0
Top deck fore corridor	"You need a torch or you'll get eaten by a space grue, a grizzly way to go."	0
Top deck aft corridor	"[one of ]The rumour going around the galaxy since your epic slam performance in that dive bar on Galderblatt XVIII is that you're quite a poet. Or should I call you Captain Rhyme?[or] The sun shoe key is as easy as 1 2 3[at random]."	0
Top deck aft corridor	"Remember, when you're stuck -- just lube up."	0


Part - Out of World

Chapter - Appending undo to the list of end game options

Table of Final Question Options (continued)
Final question wording		only if victorious		topic		final response rule 		final response activity
"UNDO the previous move"	false				"undo"	immediately undo rule	--


Chapter - Oxygen level

Oxygen level is a number that varies. 
The oxygen level is 700.

Every turn when repressurising the ship has not ended:
	decrease the oxygen level by 1;
	if the oxygen level is 0:
		end the game saying "[youAsphyxiate][line break][yourDead]".
		

Section - Oxygen level warnings

OxygenLow is a truth state that varies. OxygenLow is false.

Every turn when the oxygen level is 70:
	now the OxygenLow is True.
	
Every turn when OxygenLow is True:
	if the oxygen level is greater than 30 and a random chance of 1 in 6 succeeds:
		repeat through the table of Oxygen Getting Low:
			say "[text entry][line break]";
			blank out the whole row;
			rule succeeds;
	if the oxygen level is less than 30 and a random chance of 1 in 6 succeeds:
		repeat through the table of Oxygen Low:
			say "[text entry][line break]";
			blank out the whole row;
			rule succeeds;
		
Table of Oxygen Getting Low
Text
"You feel yourself breathing harder. Oxygen seems to be getting thinner."
"You stop for a moment, and take a large gasp of air. A quick look at your HUD's oxygen level reads [oxygen level / 7]%. That's bad. Better get a move on."
"Every movement is starting to feel like you're wading through a tide of sand."

Table of Oxygen Low
Text
"You're starting to feel lightheaded. You shake your head vigorously. Must stay awake."
"You gasp hard, drawing in what little air you can. You haven't much time now."


Part - Scenes

Chapter - Main Goals

Section - Fixing the captain's door
		
Fixing the captain's door is a scene.
Fixing the captain's door begins when play begins.
Fixing the captain's door ends when the functional fuse is in the charred fusebox.


Section - Acquiring the torch

Acquiring the torch is a scene.
Acquiring the torch begins when play begins.
Acquiring the torch ends after when the player carries the auroscope for the first time.


Section - Fixing the generator

Fixing the generator is a scene.
Fixing the generator begins when play begins.
Fixing the generator ends when the honnecourt generator is working.

When fixing the generator ends:
	say "The small light on the control box starts glowing a pale blue, and, after a few seconds, begins blinking, intermittently. You notice the chute start to vibrate gently... then more strongly, then even more powerfully until it begins to shake like a run down washing machine. Oh, shi -- suddenly, the vibrations soften...and fluorescent light from above floods the room.
	
Now that the generator's working again, you'd better see if you can fix the hull breach in the starboard cargo hold. You just hope that a swarm of space-grues haven't passed through the breach and infested it -- you'd be surprised how often that happens.";
	now every room is lit;
	now all rooms are fully powered;


Section - Fixing the hull breach

Fixing the hull breach is a scene.
Fixing the hull breach begins when play begins.
Fixing the hull breach ends when the patched hull is in the starboard cargo hold.


Section - Repressurising the ship

Repressurising the ship is a scene.
Repressurising the ship begins when play begins.
Repressurising the ship ends when shipPressurised is true.


Section - Fixing the EVA pack

Fixing the EVA pack is a scene. 
Fixing the EVA pack begins when the player has been in the airlock. 
Fixing the EVA pack ends when the EVA pack is fixed.


Section - Repairing the engines

Repairing the engines is a scene. 
Repairing the engines begins when play begins.
Repairing the engines ends when the engines are repaired.

Section - Firing up the engines

Game completed is a truth state that varies. Game completed is false.

Firing up the engines is a scene.
Firing up the engines begins when play begins.
Firing up the engines ends when the ignition button is switched on.

When firing up the engines ends:
	end the game saying "[bold type][youWin][roman type]";
	if the score is less than 100:
		say "[line break][italic type]Well done! You did great to complete the game with [score] point[s], but there are still some things you have yet to achieve:[roman type][paragraph break]";
		repeat through the Table of Tasks Achieved:
			if there is no TurnCount entry and the citation entry is not "killing Bryan"::
				say "[italic type][citation entry in sentence case].[roman type][line break]";
	otherwise:
		say "[italic type]My stars! You little legend you. You've completed the game with a perfect score!! Great work!!![roman type]"
		


Chapter - Events

Section - Launching escape pod 

Launching escape pod is a scene.
Launching escape pod begins when red-pod button is switched on.
Launching escape pod ends when escape pod room is off-stage.


Section - Generator shaking

Generator shaking is a scene. 
Generator shaking begins when honnecourt generator is malfunctioning.
Generator shaking ends when the red button is switched on.

Every turn during generator shaking:
	if the player is in the generator room:
		repeat through Table of Generator Shaking Events:
			say "[event entry][paragraph break]";
			blank out the whole row;
			rule succeeds;
	otherwise if the player is in the bottom deck corridor:
		say "[one of]Behind you, the walls shake. You feel the vibrations running up your body all the way to your head[or]The vibrations continue to come from the [generator room][stopping].";
	otherwise if the player is in the janitor's cupboard:
		say "You hear something weird coming from the generator room.";
	if the honnecourt generator has been malfunctioning for more than five turns:
		say "[if the player is in the generator room]The out of control generator spins violently around, catching you clean on the head, shattering your helmet, and hurling you into the far wall. You crawl around for a few seconds holding a broken arm, gasping for air, your body stiffening, vision fading, as you begin to lose consciousness.[otherwise]You hear an explosion. Hearing explosions is rarely a good thing, but hearing explosions in an airless environment is both surreal and bad. You think for a moment: what would an explosion that can defy the law of physics in an airless environment sound like, in an environment [italic type]with[roman type] air. Probably loud -- no -- [italic type]very[roman type] loud. 'Captain...' says a shrill voice. You look across the board to see a wispy young man in a billowy gown looking very smug and self-satisfied. 'King me!'";
		end the game saying "[if the player is in the generator room][youAsphyxiate][line break][yourDead][otherwise]The generator has exploded, and you're now playing checkers with Bryson of Heraclea in the new world[line break][yourDead]".

Table of Generator Shaking Events
event
"Within a few seconds of pressing the green button, the light on the control box starts blinking a pale blue and the generator starts to vibrate. You stand back for a moment in optimistic observation."
"Something's wrong; the vibrations seem to be getting stronger."
"The generator starts shaking and spitting out globules of ooze and metal from the separation chute."  
"You duck to avoid a piece of goo covered shrapnel, and sigh. The vibrations are getting so strong that the generator is starting to visibly shuffle around the room."
"The generator is quaking like a [one of]garden mower made from blancmange during an earthquake[or]broken washing machine with the DTs[at random]. This is bad! You better put a stop to this before the whole thing blows."
"You're cornered by the infernal machine! The only thing keeping it at bay is the straining pipes and wires attached to it."

When generator shaking ends:
	if the piece of paper is in the output slot:
		remove the piece of paper from play;
	move the second generator report to the output slot;		
	if the honnecourt generator has been malfunctioning for more than three turns:
		say "Frantically, you grab the control box and push the red button. You keep as far away from the machine as possible, watching its movements. First it judders, then it limps, then seems to gambole and prance, then it hulks for a while (which scares you greatly), and lastly, it lurches towards the center of the room, slowing down with every movement until finally it comes to a stop, and burps something out of the control box.";
	otherwise:
		say "You switch off the generator and it slows down its vibrations until it finally comes to a stop, and burps out something from the control box."
		
Instead of doing something other than looking, opening, attacking, going, switching on, or switching off during generator shaking, say "You'd better keep your eye on the generator for now."


Section - Creating the Aided Stethoscope

Creating the rawked up stethoscope is a scene.
Creating the rawked up stethoscope begins when play begins.

Creating the rawked up stethoscope ends when the rawked up stethoscope is on-stage.


Section - Cracking the Drug Safe

Cracking the drug safe is a scene.
Cracking the drug safe begins when play begins.

Cracking the drug safe ends when the drug safe is open for the first time.


Section - Smashing the display case

Smashing the display case is a scene.
Smashing the display case begins when play begins.
Smashing the display case ends when the glass case is off-stage.


Section - Acquiring the auroscope

Acquiring the auroscope is a scene.
Acquiring the auroscope begins when play begins.
Acquiring the auroscope ends when the auroscope is not part of the medical pod.


Section - Saving/Killing bryan

SavingKillingBryan is a scene.
SavingKillingBryan begins when play begins.
SavingKillingBryan ends happily when the honnecourt generator is unclogged and Bryan is on-stage.

SavingKillingBryan ends unhappily when the honnecourt generator is unclogged and Bryan is off-stage.


Section - Stuck armoury door

StuckArmouryDoor is a scene.
StuckArmouryDoor begins when play begins.
StuckArmouryDoor ends when armoury door is not stuck.


Section - Modifying Harpoon

modifyingHarpoon is a scene.
modifyingHarpoon begins when the player carries the harpoon for the first time.
modifyingHarpoon ends when harpoon is sticky for the first time.


Section - Retrieving Hull Plate

retrievingHullPlate is a scene.
retrievingHullPlate begins when harpoon is sticky for the first time.
retrievingHullPlate ends when the hull plate is part of the hull breach.


Section - Airlock Locked

AirlockLocked is a scene.
AirlockLocked begins when play begins.
AirlockLocked ends when inner airlock door is access permitted.


Section - Launching the escape pod

Launching the escape pod is a scene.
Launching the escape pod begins when play begins.
Launching the escape pod ends when the escape pod room door is sealed. 


Section - Buttoning up the distress signal

Buttoning up the distress signal is a scene.
Buttoning up the distress signal begins when play begins.
Buttoning up the distress signal ends when the bloody button is part of the distress signal..


Section - Soaking the distress signal 

Soaking the distress signal is a scene.
Soaking the distress signal begins when play begins.
Soaking the distress signal ends when the distress signal is charged for the first time.


Section - Launching the distress signal

Launching the distress signal is a scene.
Launching the distress signal begins when play begins.
Launching the distress signal ends when the distress signal is off-stage.


Section - Melting the space putty

Melting the space putty is a scene.
Melting the space putty begins when play begins.
Melting the space putty ends when the space putty is gloopy for the first time.


Section - Acquiring the replacement starter nozzle

Acquiring the replacement starter nozzle is a scene.
Acquiring the replacement starter nozzle begins when play begins.
Acquiring the replacement starter nozzle ends when the player carries the replacement starter nozzle for the first time.


Section - Vanquishing the giant space cockroach

Vanquishing the giant space cockroach is a scene. Vanquishing the giant space cockroach begins when play begins.

Vanquishing the giant space cockroach ends when the giant space cockroach is off-stage.

When vanquishing the giant space cockroach ends when the giant space cockroach is not visible and the starboard cargo hold has not been visited:
	change the starboard cargo hold to cockroach-missing.


Section - Curing the headache

Curing the headache is a scene. Curing the headache begins when the player is headachy. Curing the headache ends when the player is not headachy.


Section - Opening the bridge door

Opening the bridge door is a scene. Opening the bridge door begins when play begins. Opening the bridge door ends when the bridge door is open.


Part - The Player

Chapter - The Saved location

The saved location is a room that varies.


Chapter - Headache

A person can be headachy. 
The headache rate is a number that varies. 
The headache rate is 20.
A person is seldom headachy. 

Every turn:
	if repressurising the ship has ended:
		if the player has not been headachy:
			if a random chance of 1 in 3 succeeds:
				now the player is headachy;
				say "Those damn alarms may have spared you death by asphyxiation, but they haven't half given you a splitting headache. Good thing you found that box of aspirin earlier...you did didn't you?".

Every turn when the player is headachy:
	if a random chance of one in headache rate succeeds:
		say "[one of]Your head feels like a marching band are playing through the entire back catalogue of Barry Manilow records somewhere near your frontal lobes[or]Your head is pounding like bad German Techno music[or]Your head feels like your brain is an egg at the moment of omelette conception[or]Your head feels like you've married Henry the Eighth and he's got bored of you[or]Your head feels like your brain is giving itself a tattoo[or]Your headache rolls like an ocean, the current tugging at the speedos of your sanity[or]Your brains are throbbing like a lump of battered gristle[at random].".


Chapter - Clothes
	
[SPACESUIT]
	
The player is wearing a spacesuit. The spacesuit can be gooey.

Understand  "suit" as spacesuit.

The description of the player is "You are wearing a spacesuit and helmet.[if the plunger is worn] You've also got a plunger stuck to your head.[end if]"

Instead of examining the player when the EVA pack is worn, say "You're strapped into the extra-vehicular activity pack, ready for action."

The description of the spacesuit is "It's very uncomfortable[if the spacesuit is gooey] and covered in cockroach goo[end if]."

Instead of taking off the spacesuit, say "No doubt you would love nothing more than to get out this uncomfortable silver skin, however it is in fact one of the few things keeping you alive right now."

Instead of taking off the spacesuit when repressurising the ship has ended, say "It's a little chilly for that."

[HELMET]

The player is wearing a helmet. 
The description of the helmet is "A rather dapper flash gordon red with yellow lightning streak graphics on either side. The helmet features a HUD detailing oxygen level, and a data feed linking to the ship computer's status."

Instead of taking off the helmet:
	if repressurising the ship has ended:
		say "You hold your breath as you pop the release catch and remove the helmet....well you're still alive so I guess you fixed the hull breach and pressurised the ship.";
		continue the action;
	otherwise:
		say "Taking off your helmet would give you a clearer viewer, but you'd only have a few second to enjoy it before death. Best keep it on for now.".
		
Instead of dropping the helmet when the helmet is not worn:
	say "You'd better not, you might need that."
	
[HUD]

A HUD is part of the helmet.

Understand "head up display" as the HUD.

The description is "[fixed letter spacing]Oxygen Level: [if the oxygen level is less than 50][bold type][end if][if the oxygen level is less than 10]CRITICAL [roman type][otherwise][oxygen level / 7]%[roman type][paragraph break][fixed letter spacing]Ship status:[line break][ship status][variable letter spacing]"

Instead of examining the HUD when the helmet is not worn:
	say "The HUD isn't powered unless the helmet is worn."


Part - Scoring

Report requesting the score for the first time:
	say "For a more detailed score report, type [bold type]full score[roman type].".

Chapter - Full score

The maximum score is 100.

Requesting the full score is an action out of world. Understand "full" or "full score" as requesting the full score.

Tasks begun is a truth state that varies. Tasks begun is false.

To record (T - text) as achieved:
	choose row with a citation of T in the Table of Tasks Achieved;
	if there is no TurnCount entry:
		change TurnCount entry to the turn count;
		award (points entry) points;
		if tasks begun is False:
			change tasks begun to True.

Carry out requesting the full score:
	if the score is 0, say "You have achieved nothing." instead;
	if number of charted rooms is greater than 0:
		say "[italic type]Important rooms score: [number of charted rooms] point[s] out of 19[paragraph break][italic type]";
	if tasks begun is True:
		say "[italic type]Tasks score: [score - number of charted rooms] point[s] out of 81 [line break][roman type]";
	repeat through the Table of Tasks Achieved in reverse TurnCount order:
		say "[italic type][citation entry in sentence case] -- [points entry] point[s] -- Turn [TurnCount entry][line break][roman type]".


Table of Tasks Achieved 	[Total Points - 81]
Points		Citation				TurnCount
1		"finding the spanner"	a number
1		"finding the functional fuse"
1		"finding the hanger"
1 		"finding the plunger"
1 		"finding gas cylinder 3"
1		"finding gas cylinder 1"
1		"finding the technical manual"
1 		"finding the mini fuel canister"
1		"finding the small shovel"
1		"finding the pliers"
1		"finding the hammer"
1 		"finding gas cylinder 4"
1		"finding the space-o-lube tube"
1		"finding the bicycle repair kit"
1		"finding the string"
1 		"finding the packing knife"
1		"finding the packing foam"
1		"finding the harpoon gun"
1		"finding the EVA joystick"
1 		"finding the lighter"
1		"finding gas cylinder 2"
1		"finding the space putty"
1		"finding the kitchen tray"
1		"finding the stethoscope"
1		"finding the hearing aid"
1		"finding the glass case"
1		"finding the distress signal"
1		"finding the bloody button"
1		"finding the Pacifist MK3"
1		"locating the charred maintenance panel" 
2		"fixing the captain's door"
2		"finding the torch"
2		"fixing the generator"
2		"repairing the hull breach"
2		"repressurising the ship"
2		"fixing the EVA pack"
2		"repairing the engines"
2		"killing Bryan"
5		"saving Bryan"
5		"vanquishing the space cockroach"
1		"creating the rawked up stethoscope"
1		"cracking the drug safe"
1		"smashing the display case"
1		"opening the stuck armoury door"
1		"plungerifying the harpoon gun"
1		"retrieving the hull plate"
1		"accessing the airlock"
1		"launching the escape pod"
1		"buttoning up the distress signal"
1		"soaking the distress signal"
1		"launching the distress signal"
1		"melting the space putty"
1		"acquiring the replacement starter nozzle"
1		"curing the headache"
1		"opening the bridge door"
10 		"firing up the engines"
2		"receiving a gift from Bryan"


Section - Item Scoring

Before taking the spanner, record "finding the spanner" as achieved.
Before taking the functional fuse, record "finding the functional fuse" as achieved.
Before taking the hanger, record "finding the hanger" as achieved.
Before taking the plunger, record "finding the plunger" as achieved.
Before taking gas cylinder 3, record  "finding gas cylinder 3" as achieved.
Before taking gas cylinder 1, record "finding gas cylinder 1" as achieved.
Before taking the technical manual, record "finding the technical manual" as achieved.
Before taking the mini fuel canister, record "finding the mini fuel canister" as achieved.
Before taking the small shovel, record "finding the small shovel" as achieved.
Before taking the pliers, record "finding the pliers" as achieved.
Before taking the hammer, record "finding the hammer" as achieved.
Before taking gas cylinder 4, record "finding gas cylinder 4" as achieved.
Before taking the space-o-lube tube, record "finding the space-o-lube tube" as achieved.
Before taking the bicycle repair kit, record "finding the bicycle repair kit" as achieved.
Before taking the string, record "finding the string" as achieved.
Before taking the packing knife, record "finding the packing knife" as achieved.
Before taking the packing foam, record "finding the packing foam" as achieved.
Before taking the harpoon gun, record "finding the harpoon gun" as achieved.
Before taking the EVA joystick, record "finding the EVA joystick" as achieved.
Before taking the lighter, record "finding the lighter" as achieved.
Before taking gas cylinder 2 , record "finding gas cylinder 2" as achieved.
Before taking the space putty, record "finding the space putty" as achieved.
Before taking the kitchen tray, record "finding the kitchen tray" as achieved.
Before taking the stethoscope, record "finding the stethoscope" as achieved.
Before taking the hearing aid, record "finding the hearing aid" as achieved.
Before taking the glass case, record "finding the glass case" as achieved.
Before taking the distress signal, record "finding the distress signal" as achieved.
Before taking the bloody button, record "finding the bloody button" as achieved.
Before taking the pacifist MK3, record "finding the Pacifist MK3" as achieved.

Section - Room Scoring 

[Total points - 19]

A room can be charted or uncharted. A room is usually uncharted.

Carry out going to an unvisited scored room(called location):
	 now the location is charted;
	award 1 point.

Section - Main Goals

When fixing the captain's door ends:
	record "fixing the captain's door" as achieved.
		
When acquiring the auroscope ends:
	record "finding the torch" as achieved.

When fixing the generator ends:
	record "fixing the generator" as achieved.

When fixing the hull breach ends:
	record "repairing the hull breach" as achieved.
	
When repressurising the ship ends:
	record "repressurising the ship" as achieved. 
	
When fixing the EVA pack ends:
	record "fixing the EVA pack" as achieved.
	
When repairing the engines ends:
	record "repairing the engines" as achieved.

Section - Bryan's Fate

When SavingKillingBryan ends unhappily:
	record "killing Bryan" as achieved.
	
When SavingKillingBryan ends happily:
	record "saving Bryan" as achieved.

Section - Vanquishing the Cockroach

When vanquishing the giant space cockroach ends:
	record "vanquishing the space cockroach" as achieved.

Section = Intermediate goals

Before examining or opening the Captain's Quarters door for the first time:
	record "locating the charred maintenance panel" as achieved.

When creating the rawked up stethoscope ends:
	record "creating the rawked up stethoscope" as achieved.
	
When cracking the drug safe ends:
	record "cracking the drug safe" as achieved.
	
When smashing the display case ends:
	record "smashing the display case" as achieved.

When stuckArmouryDoor ends:
	record "opening the stuck armoury door" as achieved.

When modifyingHarpoon ends:
	record "plungerifying the harpoon gun" as achieved.

When retrievingHullPlate ends:
	record "retrieving the hull plate" as achieved..

When airlockLocked ends:
	record "accessing the airlock" as achieved.

When launching the escape pod ends:
	record "launching the escape pod" as achieved.
	
When buttoning up the distress signal ends:
	record "buttoning up the distress signal" as achieved.
	
When soaking the distress signal ends:
	record "soaking the distress signal" as achieved.

When launching the distress signal ends:
	record "launching the distress signal" as achieved.
	
When melting the space putty ends:
	record "melting the space putty" as achieved.
	
When acquiring the replacement starter nozzle ends:
	record "acquiring the replacement starter nozzle" as achieved.
	
When curing the headache ends:
	record "curing the headache" as achieved.

When opening the bridge door ends:
	record "opening the bridge door" as achieved..

Section - Game Completion

[When firing up the engines ends:
	record "firing up the engines" as achieved. -- this  is in the switching the ignition button on code ]

Section - Bonus Points

[The receiving the gift from bryan points award code is in Bryan's section]

Section  - Rankings

Table 1 - Rankings
score	rank 
0		"Grease Monkey"
7		"Cargo Packer"
14		"Senior Cargo Packer First Class"
21		"Technician"
28		"Engineer"
35		"Programmer"
42		"Quartermaster"
49		"Science Officer (even if you don't have pointy ears)"
56		"Station Administrator"
63		"Captain"
72		"Minister of Science"
100		"President of the Third Galactic Union" 


Part - Testing - Not for release

[Chapter - Object response test scripts]

[Test analyze-all with "analyze spacesuit/analyze helmet/analyze EVA pack/analyze controls/analyze blank space /analyze brochure /analyze space-o-lube brochure /analyze Gun Rack /analyze Pacifier MK3 Rifle /analyze harpoon gun /analyze joystick /analyze game of hangman /analyze drawing of a space maiden /analyze cigarette burn /analyze dried marker pens /analyze Four poker chip holders /analyze pack of playing cards /analyze LED /analyze broken lid /analyze latest pic /analyze small statue /analyze broken pencils /analyze bottle of rum /analyze spanner /analyze clothes /analyze hanger /analyze long hook /analyze Flowing water /analyze pair of taps /analyze plug /analyze plunger /analyze toilet seat /analyze toilet lid /analyze plush towel /analyze cabinet shelves /analyze disposable razors/analyze can of shaving foam /analyze blue toothbrush /analyze stock of toothpaste /analyze pills and medicine /analyze mirror panels /analyze medicine cabinet /analyze stethoscope /analyze aided stethoscope /analyze technical manual /analyze shattered glass /analyze antique pig bone /analyze synthetic eye /analyze access panel /analyze LED lights /analyze retinal scanner /analyze poker night schedule /analyze vending machine /analyze plastic cup /analyze recesses /analyze sauce bottle /analyze blood red shirt /analyze bloody button /analyze EVA joystick /analyze distress signal /analyze film collection /analyze kids action figures /analyze sci-fi security panel /analyze mauve iris scanner /analyze stir-fry /analyze appliances /analyze replacement starter nozzle /analyze jar of pesto /analyze tomato /analyze bottle of beer /analyze Cookbook /analyze ashtray /analyze glove /analyze pinchinko plug /analyze rec room porthole /analyze holo-projection screen /analyze remote-buttons /analyze emergency-buttons /analyze space putty /analyze Tiger Drive /analyze storage lockers /analyze mini fuel canister /analyze aluminium tube /analyze bioreactor chamber /analyze control box /analyze minimalist buttons /analyze small light /analyze piece of paper /analyze second generator report /analyze gasifier balloon /analyze pipes and wires /analyze gunk /analyze tracks /analyze backup generator /analyze leftovers /analyze Bryan's whisk /analyze small shovel /analyze hammer /analyze gardening fork /analyze galvanised mop bucket /analyze rancid water /analyze uninteresting janitorial shelf items /analyze pliers /analyze mysterious black box /analyze antique bicycle /analyze bicycle repair kit /analyze clamp control panel /analyze movement joystick /analyze string /analyze packing knife /analyze can of instant packing foam /analyze space-o-lube tube /analyze foxstar note /analyze small lemon-scented moist hand towel /analyze hull plate /analyze patched hull /analyze gelatinous goo /analyze engines /analyze left engine /analyze right engine /analyze right starter nozzle /analyze fuel line  desk"]


Section - Oxygen

Breathing is an action out of world.

Understand "oxygen" as breathing.

Carry out breathing:
	now the oxygen level is 700.
	
Report breathing:
	say "You now have full oxygen."


Section - Claim (works like purloin)

Claiming is an action applying to one thing.

Understand "claim [any thing]" as claiming.

Carry out claiming something:
	move the noun to the player;
	say "You claim the [noun].".
	

Section - Listing testing commands

Listing testing commands is an action out of world.

Understand "testing" or "list testing commands" or "testing commands" as listing testing commands.

Carry out listing testing commands:
	say "[bold type]Testing Commands[roman type][paragraph break]*  List rooms : To list all the rooms in the game, type 'rooms' or 'list rooms'.[line break]* Transport to : To transport to any room in the game, type 'transport to (name of room)', or use the abbreviation 't (name of room)'.[line break]* Unlock all : To unlock all the rooms in the game, type 'open sesame' or 'sesame' or 'unlock all'.[line break]* To switch on, or switch off power to the ship: Type 'power'."


Section - List rooms

[This will produce a list of all the rooms in the game]

Listing rooms is an action out of world.

Understand "rooms" as listing rooms.

Carry out listing rooms:
	repeat with item running through rooms:
		say "[item][line break]"


Section - Transport to

[This will transport the player to any rooms in the game]

Does the player mean transporting to somewhere: it is very likely.

Transporting to is an action applying to one thing.

Understand "transport to [any room]" as transporting to.

Understand "t [any room]" or "t to [any room]" as transporting to.

Before transporting to a room:
	say "(Type rooms for a list of more locations)[line break]"

Carry out transporting to a room(called the target):
	move the player to the target.


Section - Unlocking all

Unlocking all is an action out of world.

Understand "sesame" or "open sesame" or "unlock all" as unlocking all.

Carry out unlocking all:
	say "Open sesame! (All doors are now open)";
	now every door is open;
	now the armoury door is not stuck.


Section - Ship power

[This can be used to toggle the ship's power on or off. It's only really used in emulating what happens when you fix the generator; the game's world is not meant to change back and forth between powered and unpowered states]

Ship power is a truth state that varies. 
Ship power is false.

Switching power is an action out of world. 
Understand "power" as switching power.

Carry out switching power:
	if ship power is false:
		say "You power up the ship.";
		change ship power to true;
		now all rooms are fully powered;
		now all fully powered rooms are lighted;
	otherwise:
		say "You turn off power to the ship.";
		now all rooms are unpowered;
		now all unpowered rooms are not lighted;
		now all rooms in the Top_Deck are emergency powered;
		change ship power to false;


Section - Removing the cockroach

Removing the cockroach is an action applying to nothing. Understand "remove cockroach" as removing the cockroach.

Carry out removing the cockroach:
	remove the giant space cockroach from play.
	

Section - Unsticking the armoury door

Unsticking the armoury door is an action applying to nothing.

Understand "unstick armoury door" as unsticking the armoury door.

Carry out unsticking the armoury door:
	now the armoury door is dented;
	now the armoury door is bryan-opened;
	now the armoury door is not stuck.
		 

Chapter - Testing Scripts

[This section holds any of the testing scripts used in our game. A list of all the testing scripts available can be found by typing 'test' during play. You can then choose a testing script to play by typing 'test' followed by the name of the test eg 'test door-sol']

Section - Test Captain's Quarters

Test CQ with "x status monitor/attack status monitor/take status monitor/x desk/x terminal/attack terminal/x fore fusebox/open fore fusebox/take functional fuse/x status monitor/x terminal/x bed/enter bed/put functional fuse on the bed/x bed/take functional fuse/x drawer/open drawer/x drawer/take pencils/take rum/take spanner/x spanner/x porthole/open porthole/attack porthole/x media/take media/x shelves/take shelves/put fuse on shelves/x books/take books/x art print/take art print/attack art print/x pictures/take pictures/x locker/open locker/x clothes/x hanger/take clothes/take hanger/enter locker/close locker/look/open locker/get out/x door/open door/close door/attack door/attack door with the spanner/x charred panel/open charred panel/attack charred panel/hit the charred panel with the spanner/take melted fuse/x desk/x charred panel/x cover panel/take cover panel/put functional fuse in maintenance box/x door/ open door/take functional fuse/x door/close door".


Section - Test Fix Captain's Quarters Door

Test door-sol with "open fore fusebox/take functional fuse/x door/x desk/open drawer/take spanner/open charred fusebox with spanner/take fuse/put functional fuse in charred fusebox/x door/open door".


Section - Test Armoury Access Panel

Test a-access with "test door-sol/sb/a/type 21387 on panel".

Section - Test Lube Sol

Test lube-sol with "aft/pull plunger/fore/test door-sol/sb/aft/x armoury door/x brochure holder/take brochure/x brochure/sb/break bone/use pod/take auroscope/switch on auroscope/p/f/d/d/f/put plunger in chute/ pull plunger/press green/aft/p/take envelope/take space-o-lube/port/sb/up/up/aft/squirt space-o-lube on armoury door/open armoury door/wipe shoes with small lemon-scented hand towel/drop space-o-lube tube/look".


Section - Test Bryan

Test bryan with "aft/pull plunger/fore/open wardrobe/take hanger/test door-sol/sb/aft/sb/break bone/use pod/take auroscope/switch on auroscope/p/f/d/d/open generator room door/f/open janitor's cupboard door/p/take pliers/sb".


Section - Test Getting Torch

Test torch-get with "test door-sol/sb/aft/sb/break bone/use pod/take auroscope/switch on auroscope".

Section - Saving/Killing Bryan

test savBryHang with "cut hanger with pliers/bend hanger/put hanger in chute/ pull hook"

test savBryPlung with "put plunger in chute/pull plunger"

test killBryShov with "put shovel in chute/put shovel in chute"


Section - Test Complete Game

Test full-score with "test captains /test captToEnsu / test ensuite / test ensuToBrief / test briefing / test briefToInfirm / test infirmary /test infirmToTdac / test tdac / test tdacToGen / test generator / test savingBryan / test fixGen / test bryanRoachdetour/ test genToPch / test portHold / test pchToArmdoor / test armdoor / test armdoorToArm / test armoury / test armToQuart / test quarters / test quartToEns/ test ensToToilets / test toilets / test toiletsToRec / test rec / test recToCant / test canteen / test cantToKitch / test kitchen / test kitchToSbch / test starboardHold / test schToEngroom / test engineroom / test aspirin/ test engroomToAirlock / test airlock / test launchDistSig / test moveOutside / test fixEngines / test outBotToKitch / test createNozzle / test kitchToOutBot / test replacenozzle / test OutsideToBridge / test bridge / Test bridToPod / test escapePod / test letsEndThis".

Test full-kill with "test captains /test captToEnsu / test ensuite / test ensuToBrief / test briefing / test briefToInfirm / test infirmary /test infirmToTdac / test tdac / test tdacToGen / test generator / test killBryan / test fixGen /  test genToPch / test portHold / test pchToArmdoor / test armdoor / test armdoorToArm / test armoury / test armToQuart / test quarters / test quartToEns/ test ensToToilets / test toilets / test toiletsToRec / test rec / test recToCant / test canteen / test cantToKitch / test kitchen / test kitchToSbch / test roachKill/ test starboardHold / test schToEngroom / test engineroom / test aspirin/ test engroomToAirlock / test airlock / test launchDistSig / test moveOutside / test fixEngines / test outBotToKitch / test createNozzle / test kitchToOutBot / test replacenozzle / test OutsideToBridge / test bridge / Test bridToPod / test escapePod / test letsEndThis".



[Test full-kill with "test captains /test captToEnsu / test ensuite / test ensuToBrief / test briefing / test briefToInfirm / test infirmary /test infirmToTdac / test tdac / test tdacToGen / test generator / test killBryan / test fixGen / test genToPch / test portHold / test pchToArmdoor / test armdoor / test armdoorToArm / test armoury / test armToQuart / test quarters / test quartToEns/ test ensToToilets / test toilets / test toiletsToRec / test rec / test recToCant / test canteen / test cantToKitch / test kitchen / test kitchToSbch / test starboardHold / test schToEngroom / test engineroom / test aspirin / test engroomToAirlock / test airlock / test launchDistSig / test moveOutside / test fixEngines / test outBotToKitch / test createNozzle / test kitchToOutBot / test replacenozzle / test OutsideToBridge / test bridge / Test bridToPod / test escapePod / test letsEndThis".]

Test captains with "x door/open drawer/take spanner/take small statue/hit charred fusebox with spanner/take melted fuse/open fore fusebox/take fuse/put fuse in charred fusebox/open door/open wardrobe/take hanger".
Test captToEnsu with "a".
Test ensuite with "take towel/pull plunger/open cabinet/take toothbrush/take aspirin box".
Test ensuToBrief with "f/sb/sb".
Test briefing with "take cards/take cylinder".
Test briefToInfirm with "p/a/sb".
Test infirmary with "enter pod/exit/take torch/open supplies locker/take hearing aid and stethoscope/open drug safe/put stethoscope on drug safe/ use the hearing aid on the stethoscope/use rawked up stethoscope on the drug safe/take cylinder 1 and manual/take glass case/smash glass case/take bone/get in medical pod/exit/break bone/get in medical pod/take torch/switch on torch/exit".
Test infirmToTdac with "p".
Test tdac with "x armoury door/take brochure".
Test tdacToGen with "f/d/d/open generator room door/f".
Test generator with "search lockers/take shovel/x leftovers/take shiny object/open cupboard door/p/take pliers/take hammer/sb".
Test savingBryan with "x chute/look in chute/shine torch down chute/cut hanger with pliers/bend hanger/insert hanger into chute/pull hanger".
Test killBryan with "put shovel in chute/put shovel in chute".
Test fixGen with "x generator/press green button".
Test bryanRoachDetour with "aft/sb/z/z/z/z/z/z/z/z/z/z/z/z/z/z/z/p/fore".
Test genToPch with "a/p".
Test portHold with "take cylinder/take space-o-lube/take envelope/x mysterious box/x control panel/switch off clamp buttons/open mysterious box/x antique bicycle/take repair kit/open supplies crate/take string/unravel string/take packing knife/take packing foam".
Test pchToArmdoor with "sb/u/u/a".
Test armdoor with "use lube on armoury door/open armoury door".
Test armdoorToArm with "p".
Test armoury with "take harpoon gun/take pacifist mk3".
Test armToQuart with "sb/f/d/p".
Test quarters with "take joystick/open hudson's locker/use security panel/hal/hal/hal/open johnson's locker/take distress signal/take button/put button on distress signal".
Test quartToEns with "sb/u/p/a/turn on taps/put signal in washbasin".
Test EnsToToilet with "f/sb/d/a/p".
Test toilets with "".
Test toiletsToRec with "sb/f/f".
Test rec with "x sofa/take cylinder/take ashtray/take glove/take holo-remote".
Test recToCant with "a/sb".
Test canteen with "take sauce bottle/take lighter".
Test cantToKitch with "a".
Test kitchen with "take tray".
Test kitchToSbch with "p/f/d/sb".
Test roachKill with "shoot cockroach with pacifist rifle".
Test starboardHold with "x hull breach/use string with plunger/use plunger with harpoon/fire harpoon gun at hull plate/x hull plate/put repair kit on hull breach".
Test schToEngroom with "p/open engine room door/a".
Test engineroom with "take space putty/put cylinder 1 in rack/put cylinder 2 in rack/put cylinder 3 in rack/put cylinder 4 in rack/press pressure button/79655".
Test aspirin with "z/z/z/z/z/z/z/z/z/z/open aspirin box/remove helmet/eat tablet".
Test engroomToAirlock with "f/u/u/a/x access panel/input 21387 into access panel/a".
Test airlock with "insert joystick into eva pack/insert fuel cylinder into eva pack/take eva pack/wear eva pack/step on outer airlock button".
Test launchDistSig with "use distress signal".
Test moveOutside with "a/d/d".
Test fixEngines with "put repair kit on fuel line/put tray on fuel line/use can of instant packing foam with starter nozzle/use knife on right starter nozzle/x mould".
Test outBotToKitch with "u/u/f/press inner airlock button/f/f/d/sb/a".
Test createNozzle with "put putty in the microwave/close microwave/switch on microwave/put putty in the mould/z/z/z/z/z/z/z/z/z/open mould".
Test kitchToOutBot with "p/f/u/a/a/take eva pack/wear eva pack/press outer airlock button/a/d/d".
Test replaceNozzle with "put replacement nozzle on the left engine".
Test outsideToBridge with "u/u/f/step on inner airlock button/f/f".
Test bridge with "use retinal scanner/open bridge door/f".
Test bridToPod with "a/d/a/open escape pod door/a".
Test escapePod with "x panel/press red button/press red button/flick debug switch/press blue button/press blue button/turn lilac dial/use iris scanner/f/a/press yellow button/press yellow button/f/f/u/p/take fuse/put fuse in fore fusebox/x monitor/take fuse/put fuse in charred fusebox/sb/d/a/a/flick purple switch/flick orange switch/flick green switch/flick red switch/use lighter/f".
Test letsEndThis with "f/u/f/press ignition button".


Part - Status Bar

[table of content for status bar]
Table of Fancy Status
left	central		right
"Score: [score] in [turn count] turn[s] "	""	"[top rose]"
"Oxygen: [if the oxygen level is less than 50][bold type][end if][if the oxygen level is less than 10]CRITICAL [roman type][otherwise][oxygen level / 7][roman type]%"	"[if in darkness]Darkness[otherwise][location][end if]"	"[middle rose]"
""	"[torchLit]"	"[bottom rose]"

[generates points of the navigation rose]
To say rose (way - a direction):
	let place be the room way from the location;
	if the place is a room:
		say "[way abbreviation]";
	otherwise:
		say "[way spacing]";

To say torchLit:
	if the player has the switched on auroscope:
		if fixing the generator has not ended:
			say "[italic type](with torch on)[roman type]".

To say (way - a direction) abbreviation:
	choose row with a chosen way of way in the Table of Various Directions;
	say abbrev entry.
	
To say (way - direction) spacing:
	choose row with a chosen way of way in the Table of Various Directions;
	say spacing entry.

[table of abbreviations for directions of travel in game]
Table of Various Directions
chosen way	abbrev		spacing
up		"U "		"  "
fore		" F "		" "
starboard	" ST"		" "
port		"P "		"  "
aft		" A "		" "
down		"D "		"  "

[constructs the navigation rose]
To say top rose:
	say "[rose up][rose fore]".
	
To say middle rose:
	say "[rose port] . [rose starboard]".
	
To say bottom rose:
	say "[rose down][rose aft]".

[displays the status bar]
Rule for constructing the status line:
	fill status bar with Table of Fancy Status;
	rule succeeds.


Part - The Upper Deck

Chapter - Locations in the region

The Top_Deck is a region. 
[starting location must be present first in the source code ie here]
The Captain's Quarters, the Airlock, the Armoury, the Bridge, the Briefing Room, the En-suite, the Infirmary, the Top Deck Aft Corridor, and the Top Deck Fore Corridor are in the Top_Deck.  


Chapter - The Airlock

[All content for this location is taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Air_Lock&oldid=6067

]

Section - Location Description

The Airlock is a room. The airlock can be repressurising. The airlock can be depressurising.
The description is "[if unvisited]As mandated in the galaxy-wide Spaceship Construction Code, all airlocks are to conform to the established form and pattern, allowing anyone to instantly recognise which bit of the weird-shaped thing on the viewscreen is the front door.

[end if]The airlock is a square room 4 metres to a side, and has two circular doors, roughly 3 metres in diameter at either side. In the middle, on the floor for easy access by all species, are two large buttons, accessed by stepping on them.[if outer airlock button is switched on][paragraph break]The airlock is currently bathed in an ominous red light[otherwise][paragraph break]The airlock is bathed in a reassuring green light[end if].".

Instead of exiting in the Airlock when the holder of the player is the airlock:
	if the outer airlock door is open:
		try going aft;
	otherwise:
		try going fore.




Section - Outer airlock door

The outer airlock door is an airlock_door.
The outer airlock door is aft of the airlock and fore of outer space top.
The outer airlock door is sealed.

Instead of opening the sealed outer airlock door:
	say "There is no way to manually open the outer airlock door.[line break]Anyway...even if you could, the rapid depressurisation would suck you out into space so fast, not even the EVA pack could get you back to your ship. Try cycling the airlock first numb nuts.".


Section - Inner airlock door
	
The inner airlock door is an airlock_door. 
The inner airlock door is aft of the Top Deck Aft Corridor and fore of the Airlock. 
The inner airlock door can be access permitted or access denied.
The inner airlock door is access denied.

Rule for printing the name of the inner airlock door:
	if the location is the top deck aft corridor:
		say "airlock door";
	otherwise:
		continue the action.	

Instead of opening the sealed inner airlock door in the airlock:
	say "You eye the manual override for the inner airlock door, and then remember the effort you've just put in to repressurising the ship and decide not to go through that again.....best try cycling the airlock first.".
	
	
Section - Ways to not open the airlock door
	
Instead of putting something on the access denied inner airlock door:
	try using the noun on the airlock door.
	
Instead of unlocking the access denied airlock inner door with something:
	try using the second noun on the inner airlock door.	
	
Instead of using the spanner on the access denied inner airlock door:
	say "You try to find a gap in the door to lever it open with but can't find one. The door is airtight. Which is just as well really. It wouldn't be much of an airlock door if your could fit a spanner in it, now would it."
	
Instead of doing it for the second time:
	say "Frustrated, you smash the door repeatedly with the spanner but it doesn't open. You do feel slightly less frustrated though."

Instead of hitting the access denied inner airlock with the spanner, say "You whack the door a couple of times but the door stays closed. These airlock doors sure are hardy."
	
Instead of using the statue on the access denied inner airlock door, say "You hold out the statue in front of the door, hoping that zod might call upon the powers of Janus to help you open it, but nothing happens."

Instead of hitting the access denied inner airlock with the statue:
	say "You raise the statue to attack, but just as you're about to strike the door, you feel a sharp stinging pain in your hand, dropping the statue.";
	silently try dropping the statue.

Instead of using the plush towel on the access denied inner airlock door, say "You push the airlock door with the fluffy towel, hoping that somehow the fluffiness of the towel and the hardness of the door will create an electrical reaction but nothing happens."

Instead of hitting the access denied inner airlock door with the plush towel:
	try using the plush towel on the inner airlock door.
	
Instead of using the hanger on the access denied inner airlock door:
	say "Damnit! You can't find a gap in the door small enough to fit the hanger into. It's airtight.You don't think levering this open is going to work. You're just going to have to use the access panel. Ho hum."
	
Instead of hitting the access denied inner airlock door with the hanger:
	say "You hold the hanger out in front of you like a rapier and thrust. Then you balestra forward and swipe with the hanger but the airlock door doesn't even respond to parry. It just stands there closed. What a spoilsport."
	
Instead of using the plunger on the access denied inner airlock door:
	say "You jam the plunger onto the airlock door, sticking it, then give it a tug, hoping to somehow pull the door open but it doesn't work. You try again, but but still it doesn't work. The plunger just keeps unsticking. There must be a easier way to open it."
	
Instead of hitting the access denied inner airlock door with the plunger:
	try using the plunger on the inner airlock door.
	
Instead of using the can of packing foam on the access denied inner airlock door:
	say "You start squirting the foam on the door but then stop when you realise that covering it up would only serve to the door really foamy." instead.
	
Instead of spraying the can of packing foam over the access denied inner airlock door:
	try using the can of packing foam on the inner airlock door.
	
Instead of using the packing knife on the access denied inner airlock door:
	say "It's no good, the packing knife is only designed to cut foam and since airlock doors are never made of foam (for very good safety reasons) the knife isn't going to be of any help. You wonder whether access panels are made of foam though."
	
Instead of hitting the access denied inner airlock door with the packing knife:
	try using the packing knife on the inner airlock door.
	
Instead of cutting the access denied inner airlock door with the packing knife:
	try using the packing knife on the inner airlock door.
	
Instead of using the string on the access denied inner airlock door:
	say "You raise the string above your head and start swinging it like a lassoo. Once the lasso has built up sufficient momentum you aim it towards the airlock door and try to snare it. Unfortunately, you find nothing to snare and decide that using the string on the airlock door probably isn't going to help open."
	
Instead of hitting the access denied inner airlock door with the string, say "You bat the airlock door as viciously as you can with the string but the door doesn't open."

Instead of using the small lemon-scented moist hand towel on the access denied inner airlock door:
	say "You lovingly wipe the airlock door with the hand towel until the door is shining and stand back admiring your work -- but the door doesn't open."
	
Instead of hitting the access denied inner airlock door with the lemon-scented towel, say "You unleash seven shades of lemon scented fury on the door but the it doesn't budge. The door doesn't look like it would succumb to force. Maybe you should try another tact."

Instead of hitting the access denied inner airlock door with the hammer:
	say "You batter on the airlock door as hard as you can with the hammer, but it's simply too strong to be battered open. Looks like you're going to have to use your brain to open it, not your brawn.[line break]"
	
Instead of using the hammer on the access denied inner airlock door:
	try using the hammer on the inner airlock door.
	
Instead of headbutting the access denied inner airlock door:
	say "You charge at the door, head down, determined to break through to the other side but only succeed in bouncing off and making yourself very dizzy."
	
Instead of using the helmet on the armoury door when the helmet is worn:
	try headbutting the inner airlock door.
	
Instead of using the pliers on the access denied inner airlock door:
	say "You just can't find anything to cut on the airlock door. You'd probably be better directing you attention to the access panel."
	
Instead of using the whisk on the access denied inner airlock door:
	say "You start the whisk rotating using both hands and advance towards the door hoping to drill a hole in it but the whisk just flies out of your hands on making contact.";
	silently try dropping the whisk.
	
Instead of using the bicycle repair kit on the stuck armoury door:
	say "That probably isn't going to work. A bicycle repair kit is usually used for sealing punctures, not unsealing doors."
	
Instead of hitting the access denied inner airlock door with the whisk:
	try using the whisk on the inner airlock door.
	
Instead of using the mini fuel canister on the access denied inner airlock door:
	say "You stand for a second, trying to think of a possible way to use the mini-fuel canister to open the door but can't think of anything. The fuel canister probably serves another purpose."
	
Instead of hitting the stuck armoury door with the access denied inner airlock door:
	say "There may be tiny possibility that upon striking the door with the fuel canister it would explode and disintegrate it but there are two nagging doubts about that plan that stop you from attempting it: [paragraph break]1: This mini fuel canister probably serves another more important purpose.
	
2: As well as disintegrating the door, you'd probably also be disintegrated yourself."

Instead of hitting the access denied inner airlock door with the mini fuel canister for the second time:
	say "What the hell! You grab the mini fuel canister and smash it on the ...";
	change the armoury door to not stuck;
	end the game saying "You've been disintegrated. If it's any consolation, at least you managed to get the airlock door open."
	
Instead of throwing the mini fuel canister at the access denied inner airlock door:
	say "You stand back to a safe distance and bowl the canister at the airlock door. As expected the canister explodes, flashing a blinding white light over the corridor, forcing you to momentarily cover your eyes. You turn to face the airlock door expecting it to be disintegrated but it's still there. It withstood the blast! You really hope you haven't just wasted a vital item, and left yourself trapped in a doomed, inescapable, existence.";
	remove the mini fuel canister from play;

Instead of using the auroscope on the access denied inner airlock door:
	if the auroscope is switched off:
		say "(first switching on the auroscope)[command clarification break]";
	say "You shine the light on the door, hoping to find out what the problem with the door is. You find one, it's closed. Better use the access panel to try and open it, eh?"
	
Instead of hitting the access denied inner airlock door with the auroscope:
	say "You'd better not. The torch is your only protection from space grues at the moment."
	
Instead of using the shovel on the access denied inner airlock door:
	say "You whack the door, sending reverberations up your arm causing you to drop the shovel, but the door doesn't open";
	silently try dropping the shovel.
	
Instead of using a brochure on the access denied inner airlock door:
	say "You can't open a door with a brochure, that's just a ridiculous thing to attempt."


Section - The EVA Pack

Does the player mean doing something with the EVA pack: it is likely.

Does the player mean inserting something into the EVA pack: it is likely.

A bracket is in the Airlock. 
It is a container. 
The description is "[if the EVA pack is in bracket]The extra-vehicular activity pack hangs from a wall-bracket here.[otherwise]The wall-bracket is empty.".
	
Understand "wall bracket" or "wall-bracket" as the bracket.

Instead of inserting something that is not the EVA pack into the bracket:
	say "This is only designed to hold the EVA pack. You can't put anything else on it. Not kiwi fruit, not art-deco ornaments, not fridge magnets, not corgi trouser presses, nor even first edition comic books. Just extra-vehicular packs." 
	
Instead of putting something on the bracket: try inserting the noun into the bracket.

An EVA pack is in the bracket.
The EVA pack can be fixed or broken.
The EVA pack is broken and wearable. 

Understand "extra vehicular activity pack" or "extra vehicular activity pack" or "extra vehicular pack" or "extra-vehicular pack" or "activity pack" or "pack" as the EVA pack.

The description of the EVA pack is "A self-contained, propulsive backpack system, designed only for use in emergencies; you think your current predicament qualifies.
The controls are located on fold-out handles providing direct and rotational thrust[if EVA joystick is not part of the EVA pack], but the right joystick is missing. You remember your Helen telling you she needed to take it away to fix it. You hope she did.[otherwise].[end if][if mini fuel canister is part of the EVA pack] A fuel canister containing nitrogen propellant is attached to the back of the contraption.[otherwise] At the back of the contraption is an empty space where the nitrogen propellant fuel tank should be.".

Instead of taking the broken EVA pack when we have not examined the EVA pack for the first time:
	say "You lift the EVA pack from the wall and are about to attach it to your suit when you notice it is incomplete. ";
	if the eva joystick is not part of the EVA pack:
		if the mini fuel canister is not part of the EVA pack:
			say "There doesn't seem to be any fuel attached and one of the navigation joysticks is missing.";
		otherwise:
			say "The navigation joystick seems to be missing.";
	otherwise if the fuel canister is not part of the EVA pack:
		say "The fuel canister is missing.".
		
Instead of taking the broken EVA pack:
	say "There's no point in taking that until you attach the ";
	if the eva joystick is not part of the EVA pack:
		if the mini fuel canister is not part of the EVA pack:
			say "navigation joystick and the fuel canister.";
		otherwise:
			say "navigation joystick.";
	otherwise if the mini fuel canister is not part of the EVA pack:
		say "fuel canister.".
		
After wearing the EVA pack, say "You strap yourself into the EVA, and smile: it's go time!!!".

Before going through the inner airlock door:
	if the player has the EVA pack:
		say "[one of]Since it makes no sense to wear the clunky EVA pack over your spacesuit while inside, you take it off and put it back on the hook.[or]You first remove the EVA pack and put it back on the hook.[stopping]";
		now the EVA pack is on the bracket;
	otherwise:
		continue the action.

Instead of putting something on the eva pack:
	try inserting the noun into the eva pack.
	
Instead of tying something to the eva pack:
	try inserting the noun into the eva pack.
		
Instead of inserting the mini fuel canister into the EVA pack:
	now the mini fuel canister is part of the EVA pack;
	say "The generic connector interfaces nicely with the EVA pack and the fuel gauges flick up to a full load. This should last quite a while.";
	if the eva joystick is part of the EVA pack:
		now the EVA pack is fixed.

Instead of inserting the eva joystick into the EVA pack:
	now the eva joystick is part of the EVA pack;
	say "The control stick clips into place on the EVA pack and comes to life. Success, it looks like she had fixed it for you. She's getting a raise when you see her again... well maybe not a raise but a drink at least.";
	if the mini fuel canister is part of the EVA pack:
		now the EVA pack is fixed.
		
Instead of using the EVA joystick on the EVA pack:
	try putting the EVA joystick on the EVA pack.
	
Instead of using the mini fuel canister on the EVA pack:
	try putting the mini fuel canister on the EVA pack.
	
Some controls are part of the EVA pack. The description is "[if the joystick is not part of the EVA pack]Everything looks ok with the controls apart from the missing joystick, you hope Helen had time to fix it before going for shore leave.[otherwise]The controls are in perfect working order.".

An blank space is part of the EVA pack. The description is "[if the mini fuel canister is not part of the EVA pack]The nitrogen propellant tank is supposed to be here, you might be able to find one of these in the bottom deck.[otherwise]The black canister fills the space admirably.".

Understand "empty space " or "space" as the blank space.

Instead of taking off the EVA pack when the player is in Outer_Space, say "That's not a good idea at the moment for reasons which should be quite very obvious."

Instead of fixing the broken EVA pack, say "The only way to fix the EVA pack is to find the missing [if the fuel canister is not part of the EVA pack]fuel canister[end if][if the fuel canister is not part of the EVA pack and the eva joystick is not part of the EVA pack] and[end if][if the EVA joystick is not part of the EVA pack]navigation joystick[end if]."

Instead of fixing the broken EVA pack when the mini fuel canister is carried and the EVA joystick is not carried:
	try putting the mini fuel canister on the EVA pack;
	say "Well, that's the fuel canister in place, now you just need to find the navigation joystick.";
	
Instead of fixing the broken EVA pack when the EVA joystick is carried and the mini fuel canister is not carried:
	try putting the EVA joystick on the EVA pack;
	say "Well, that's the navigation joystick in place. Now all you need to find is a fuel canister."
	
Instead of fixing the broken EVA pack when the EVA joystick is carried and the mini fuel canister are carried:
	say "(first inserting the mini fuel canister)[command clarification break]";
	try putting the mini fuel canister on the EVA pack;
	say "(then inserting the EVA joystick)[command clarification break]";
	try putting the EVA joystick on the EVA pack.


Section - Airlock Buttons

Some dummy airlock buttons are a prop in the airlock. The description is "These buttons are used to access the outer and inner airlocks. Only one button is usable at a time. Currently, [if the outer airlock button is switched off]the outer airlock button is usable.[otherwise if the inner airlock button is switched off]the inner airlock button is usable.[otherwise]Both buttons are recessed while the airlock is being cycled.[end if]".

Understand "buttons" or "large buttons" or "two large buttons" as the dummy airlock buttons.


Section - The outer airlock button
		
An airlock button called the outer airlock button is in the airlock. 

Instead of examining the outer airlock button:
	if the outer airlock button is switched off:
		if the inner airlock button is switched on:
			say "The button pointing to the closed [outer airlock door] to the aft is raised and lit green[if the outer airlock button has not been switched on] -- simply step on it to activate the automated pressurisation sequence[end if]. The [inner airlock button] is recessed and inaccessible.";
	otherwise if the inner airlock button is switched on:
		say "Both the [outer airlock button] and the [inner airlock button] are now recessed while the airlock is being cycled.";
	otherwise:
		say "The button pointing to the open [outer airlock door] to the aft is recessed, leaving the [inner airlock button] raised and accessible."
	
Instead of switching on the switched off outer airlock button:
	if repressurising the ship has not ended:
		say "You [one of]stand[or]step[at random] on the [outer airlock button]. and it briefly clicks into the on position, before popping back up again. You try again, but no joy. You stamp on the button in frustration, but it mockingly pops back up once more. You think for a second.... of course! The airlock pressurisation sequence is linked to the shipwide pressurisation controls in the engine room. To use the switch you'll need to repressurise the ship. Note to self, must trade in this ship for less obtuse one after the crisis is over.";
	otherwise:
		continue the action.

Instead of switching on or switching off or using the  outer airlock button when the outer airlock button is switched on:
	 say "At the moment, the button is recessed and inaccessible. Only the [inner airlock button] is currently usable."



Section - The inner airlock button

An airlock button called the inner airlock button is in the airlock. 
It is switched on.
		
Instead of examining the inner airlock button:
	if the inner airlock button is switched off:
		if the outer airlock button is switched on:
			say "The button pointing to the closed [inner airlock door] to the fore is raised and lit green, leaving the [outer airlock button] inaccessible.";
	otherwise if the outer airlock button is switched on:
		say "Both the [outer airlock button] and the [inner airlock button] are now recessed while the airlock is being cycled.";
	otherwise: 
		say "The button pointing to the open [inner airlock door] to the fore is recessed, leaving the [outer airlock button] raised and accessible."

Instead of switching on or switching off or using the inner airlock button when the inner airlock button is switched on:
	 say "At the moment, the button is recessed and inaccessible. Only the [outer airlock button] is currently usable."


Section - Pressurisation Cycle

The inner airlock button can be cycled . The inner airlock button is not cycled.

After switching on the inner airlock button:
	now the outer airlock door is closed;
	now the outer airlock door is sealed;
	if the inner airlock button is not cycled:
		say "As you step on the outer airlock button the outer airlock door slides silently into place.";
		center "Press any key to continue[paragraph break]";	
		wait for any key;
		say "You begin to hear the rattle of the extract fans as the airlock slowly fills with air, and make a mental note to ask Bryan to check out whats making those fans rattle.";
		center "Press any key to continue[paragraph break]";	
		wait for any key;
		say "As the pressure in the airlock approaches nominal, your suit deflates again.";
		center "Press any key to continue[paragraph break]";	
		wait for any key;
		say "Finally the lights turn green and the inner airlock door to the fore opens.";
	otherwise:
		say "You wait [one of]patiently[or]impatiently[stopping] for the airlock to complete its sequence...finally the lights turn green and the inner airlock door to the fore opens."; 
	now the inner airlock door is open;
	now the inner airlock door is unsealed;
	now the outer airlock button is switched off;
	now the inner airlock button is cycled.


Section - Depressurisation Cycle

The outer airlock button can be cycled . The outer airlock button is not cycled.

After switching on the outer airlock button:
	now the inner airlock door is closed;
	now the inner airlock door is sealed;
	if the outer airlock button is not cycled:
		say "As you step on the outer airlock button the inner airlock door slams shut, the lights turn red and you hear the extract fans rattle to life.";
		center "Press any key to continue[paragraph break]";	
		wait for any key;
		say "Your suit slowly begins to inflate as the air is sucked out of the airlock.";
		center "Press any key to continue[paragraph break]";	
		wait for any key;
		say "The unsettling rattle of the extract fans fades as the atmosphere in the airlock approaches a vacuum.";
		center "Press any key to continue[paragraph break]";	
		wait for any key;
		say "Finally the outer airlock door to the aft opens and a fine mist of the remaining air jets out....what a waste of precious consumables. You really should speak to Helen about fixing those pressure sensors.";
	otherwise:
		say "You wait [one of]patiently[or]impatiently[stopping] for the airlock to complete its sequence...finally the lights turn green and the outer airlock door to the aft opens.";
	now the outer airlock door is open;
	now the outer airlock door is unsealed;
	now the inner airlock button is switched off;
	now the outer airlock button is cycled.



Section - Exiting the Ship 

Instead of going through the open outer airlock door when the player is not wearing the fixed EVA pack for the first time:
	say "Are you sure? Without some way to control your movement out there it could be dangerous. [if the eva pack is carried] (Remember for EVA packs to function at optimum efficiency, they first need to be WORN.)[end if][line break]"
	
Instead of going through the open outer airlock door when the player is not wearing the fixed EVA pack:
		say "[one of]You flail frantically, trying to get a hold on the ship, but you already know it’s too late. You watch the ship slowly shrink into the inky depths of space and wonder why you didn’t wear the EVA pack...[or]As you push out of the airlock and into space, you're momentarily overcome by a rush of vertigo. Your momentum carries you just out of reach of the hull, and you are helpless to stop your gradual drift into empty space. Looks like it'll be a slow death by asphyxiation, unless you take off your helmet.[at random]";
	end the game saying "[youAsphyxiate][line break][yourDead]".

Before going aft through the open outer airlock door when the player is wearing the fixed EVA pack for the first time:
	say "As you push out of the airlock and into space, you're momentarily overcome by a rush of vertigo. Steadying yourself, you fire a couple of short bursts on the thrusters to stabilise. You're now drifting, stationary, just outside the airlock door.";
	continue the action.

Before going fore through the open outer airlock door:
	say "With one last nudge of the control joystick, you float back into the airlock where gravity pulls you abruptly back down to the deck.";
	continue the action.
	
Instead of going nowhere when in the Airlock, say "Nothing in that direction but solid bulkhead.".

After wearing the EVA pack when the helmet is not worn:
	say "(first putting your helmet back on)[command clarification break]";
	now the helmet is worn.


Chapter - The Armoury

[All content for this location is taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Armoury

]

Section - Location Description

The Armoury is a room. 
The description is "[if unvisited]Space is dangerous, trading and hauling cargo more so. Since you're mostly out of sight of any law enforcement personnel (which is where the most money is to be made), the only justice you can rely on is found behind the handle of a loaded rifle. All the weapons are kept close to the airlock, for easy access in a crisis.

[end if]The armoury contains rack after rack of sleek, black, slightly menacing Pacifist MK3 Rifles - all poised and thrumming slightly. The only exit lies to the starboard."

Instead of exiting in the Armoury when the holder of the player is the Armoury:
	try going starboard.


Section - Armoury Door and Targeted Advertising Puzzle

The armoury door is a doorway. The armoury door is port of the Top Deck Aft Corridor and starboard of the Armoury. The armoury door is manual. The armoury door can be stuck. The armoury door is stuck. The armoury door can be lubricated. The armoury door is not lubricated. The armoury door can be bryan-opened. The armoury door can be dented.

Understand "armory" or "armory door" as the armoury door.

Instead of going through the closed armoury door:
	silently try opening the armoury door.
	
Instead of examining the armoury door:
	say "[if the armoury door is dented]The door has a large dent on it.[otherwise]This door is a little thicker than standard ship doors but otherwise similarly boring."

Understand "sign" as the armoury door when player is in the Top Deck Aft Corridor.

Instead of examining the stuck armoury door in the Top Deck Aft Corridor:	
	move the brochure holder to the Top Deck Aft Corridor;
	say "Where on earth did this sign come from?[paragraph break][fixed letter spacing]SPACE-O-LUBE: THE ONLY LUBRICANT DESIGNED TO UNJAM DOORS WHICH ARE STUCK FOLLOWING A METEORITE STRIKE ON A DEEP SPACE CARGO VESSEL. PLEASE TAKE A BROCHURE.[variable letter spacing][paragraph break][if the brochure holder was off-stage]To the right of the door you notice a small plastic brochure holder...that's strange, you don't remember that being there before."	

Instead of opening the stuck armoury door when a random chance of 1 in 3 succeeds:
	say "Just as your about to open the door, you notice something on it. [run paragraph on]";
	if the brochure holder is off-stage:
		try examining the armoury door;
	otherwise:
		continue the action.

Instead of opening the stuck armoury door:
	say "[if the brochure holder is in the Top Deck Aft Corridor]Perhaps it needs some lubricant?[otherwise][one of]That's strange, power is going to the door, yet it won't open. It seems to be stuck[or]You rattle the door, but it doesn't open[or]You give the door a thump, but it doesn't open[or]With a heavy heart you have to concede that the door is well and truly stuck[stopping].";
	
Understand "unstick [armoury door]" as opening.
		
Instead of pushing, or attacking the stuck armoury door:
	say "It's jammed. If only there was a product available that could unjam stuck doors on a damaged space cargo vessel; one can only dream."

Before opening the stuck lubricated armoury door:
	now the armoury door is not stuck.

Instead of opening the lubricated armoury door:
	now the armoury door is not lubricated;
	now the armoury door is open;
	remove the brochure holder from play;
	say "The door is now unjammed and opens smoothly. [if the player has the space-o-lube tube]You study the bottle of SPACE-O-LUBE and nod appreciatively. [end if]There is nothing better than a product that lives up to its own advertising."
	
Instead of using something on the stuck armoury door:
	say "You try to use the [noun] to unstick the door but it simply doesn't work. It looks like the door needs some lubricant."


Section - Ways to not open the armoury door
	
Instead of putting something on the stuck armoury door:
	try using the noun on the armoury door.
	
Instead of unlocking the stuck armoury door with something:
	try using the second noun on the armoury door.	
	
Instead of using the spanner on the stuck armoury door:
	say "You try to find a gap to the spanner into to lever open the door, but there doesn't seem to be one."
	Instead of doing it for the second time:
	say "Frustrated, you smash the door repeatedly with the spanner but it doesn't open. You do feel less frustrated though."

Instead of hitting the armoury door with the spanner, say "You whack the door a couple of times before reassessing the door's stucknosity... it's still stuck."
	
Instead of using the statue on the stuck armoury door, say "You hold out the statue in front of the door, hoping that zod might call upon the powers of Janus to help our open it, but nothing happens."

Instead of hitting the armoury door with the statue:
	say "You raise the statue to attack, but just as you're about to strike the door, you feel a sharp stinging pain in your hand, dropping the statue.";
	silently try dropping the statue.

Instead of using the plush towel on the stuck armoury door, say "'Take this, stuck armoury door!' you rage before attempting to beat the door within an inch of it's life using the plush towel.' After poor door has suffered a sufficient enough thrashing, with supreme confidence you try to open the door -- this can't be. You're pillow thrashing completely an utterly failed to make even the slightest impression on the door and its still stuck."

Instead of hitting the stuck armoury door with the plush towel:
	try using the plush towel on the armoury door.
	
Instead of using the hanger on the armoury door:
	say "Damnit! You can't find a gap in the door small enough to fit the hanger into. You don't think levering this open is going to work."
	
Instead of hitting the stuck armoury door with the hanger:
	say "You hold the hanger out in front of you like a rapier and thrust. Then you balestra forward and swipe with the hanger but the armoury door doesn't even respond to parry. It just stands there stuck. What a spoilsport."
	
Instead of using the plunger on the stuck armoury door:
	say "You jam the plunger onto the armoury door, sticking it, then start pulling, hoping to pull the armoury door of its frame. The plunger just unsticks. You try again. Then again but each time the plunger just keeps unsticking. You eventually concede that the plunger simply isn't up to the job."
	
Instead of hitting the armoury door with the plunger:
	try using the plunger on the armoury door.
	
Instead of using the can of packing foam on the stuck armoury door:
	say "You start squirting the foam on the door but then stop when you realise that covering the armoury door in packing foam isn't going to help open it up. You'd just be left with a foamy stuck door." instead.
	
Instead of spraying the can of packing foam over the armoury door:
	try using the can of packing foam on the armoury door.
	
Instead of using the packing knife on the stuck armoury door:
	say "It's no good, the packing knife is only designed to cut foam and since the armoury door isn't made out of foam (for if it was, it probably wouldn't be proving as tricky to open) the packing knife isn't going to work."
	
Instead of hitting the stuck armoury door with the packing knife:
	try using the packing knife on the armoury door.
	
Instead of cutting the stuck armoury door with the packing knife:
	try using the packing knife on the armoury door.
	
Instead of using the string on the stuck armoury door:
	say "You start trying to find a nook to tie the string onto but stop once you realise that the string isn't going to be strong enough to hold as you attempt to pull the door of its hinges."
	
Instead of hitting the stuck armoury door with the string, say "You bat the armoury door as viciously as you can with the string but the door doesn't succumb."

Instead of using the small lemon-scented moist hand towel on the stuck armoury door:
	say "You wipe the armoury door with the scented towel, cleaning up any existing oils or lubrication present and -- wait a minute. You're supposed to be lubing the door up, not making it dryer."
	
Instead of hitting the stuck armoury door with the lemon-scented towel, say "You unleash seven shades of lemon scented fury on the door but the door doesn't budge."

Instead of hitting the armoury door with the hammer:
	say "You batter on the armoury door as hard as you can with the hammer, but the door's simply too strong to be battered open. You're not confident that even a battering ram designed for the exclusive purpose of battering armoury doors would be able to get this open. (You secretly hope to find such a battering ram to test the supposition, though.)[line break]"
	
Instead of using the hammer on the stuck armoury door:
	try using the hammer on the armoury door.
	
Instead of headbutting the armoury door:
	say "You charge at the door, head down, determined to break through to the other side but only succeed in bouncing off and making yourself very dizzy."
	
Instead of using the helmet on the armoury door when the helmet is worn:
	try headbutting the armoury door.
	
Instead of using the pliers on the stuck armoury door:
	say "You just can't find anything to cut on the armoury door. No protruding wires marked 'please cut here in case of stuck door emergency' or anything."

Instead of using the whisk on the stuck armoury door:
	say "You start the whisk rotating using both hands and advance towards the door hoping to drill a hole in it but the whisk just flies out of your hands on making contact.";
	silently try dropping the whisk.
	
Instead of using the bicycle repair kit on the stuck armoury door:
	say "That probably isn't going to work. A bicycle repair kit is usually used for sealing punctures, not unsealing doors. The kit could probably be used to make the armoury door even more stuck though. But doing that wouldn't be helpful at the moment."
	
Instead of hitting the armoury door with the whisk:
	try using the whisk on the armoury door.
	
Instead of using the mini fuel canister on the stuck armoury door:
	say "You stand for a second, trying to think of a possible way to use the mini-fuel canister to open the door but can't think of anything. The fuel canister probably serves another purpose."
	
Instead of hitting the stuck armoury door with the mini fuel canister:
	say "There may be tiny possibility that upon striking the door with the fuel canister it would explode and disintegrate it but there are two nagging doubts about that plan that stop you from attempting it: [paragraph break]1: This mini fuel canister probably serves another more important purpose.

2: As well as disintegrating the door, you'd probably also be disintegrated yourself."

Instead of hitting the stuck armoury door with the mini fuel canister for the second time:
	say "What the hell! You grab the mini fuel canister and smash it on the ...";
	change the armoury door to not stuck;
	end the game saying "You've been disintegrated. If it's any consolation, at least you managed to get the armoury door open."
	
Instead of throwing the mini fuel canister at the stuck armoury door:
	say "You stand back to a safe distance and bowl a googli at the armoury door with the canister. As expected the canister explodes, flashing a blinding white light over the corridor, forcing you to cover your eyes. You turn to face the armoury door expecting it to be no more but it's still there. It withstood the blast! You really hope you haven't just wasted a vital item, and left yourself to living a doomed, inescapable, existence.";
	remove the mini fuel canister from play;

Instead of using the auroscope on the stuck armoury door:
	if the auroscope is switched off:
		say "(first switching on the auroscope)[command clarification break]";
	say "You shine the light on the door hoping that the beam from it (in addition to the light from the corridor itself) might be strong enough to burn a whole in the door but nothing happens."
	
Instead of hitting the stuck armoury door with the auroscope:
	say "You'd better not. The torch is your only protection from space grues at the moment."
	
Instead of using the shovel on the armoury door:
	say "You whack the door with the shovel, sending reverberations up your arm causing your to drop the shovel, but the door doesn't open";
	silently try dropping the shovel.
	
Instead of using a brochure on the armoury door:
	say "You can't open a stuck door with a brochure, that's ridiculous; however, the brochure might be advertising a product that can open the armoury door."
	
	
Section - Brochure Holder

A brochure holder is a transparent container. It is fixed in place. It is privately-named. "A trade show brochure holder stands next to the armoury door." The description is "It's stocked full of brochures advertising a product called 'space-o-lube'." A thing called  a space-o-lube brochure is inside the brochure holder.

Understand "brochure holder" or "holder" as the brochure holder.

Understand "small plastic brochure holder" as the brochure holder.

[THE SPACE-O-LUBE BROCHURE]

After taking the space-o-lube brochure for the first time:
	now the dummy brochure is in the brochure holder;
	say "You look the brochures over, hoping for a selection, but they all appear to be the same; you take the one[one of] at the very back[or] in the middle[or] fourth from the front[at random], just for kicks.";
	
Instead of examining the not handled space-o-lube brochure, say "You'd need to take one before you can read it."
	
[THE DUMMY BROCHURE]

Understand "brochure" or "space-o-lube brochure" or "space o lube brochure" or "another space-o-lube brochure" or "another brochure" or " another space o lube brochure" as the dummy brochure. It is proper-named. The printed name of the dummy brochure is "another space-o-lube brochure".

Instead of taking the dummy brochure, say "You've already taken one. What on earth did you do with it?"

Instead of doing something other than taking with the dummy brochure, say "The rest of these brochures are as uninteresting as the one[if the player carries the space-o-lube brochure] you have in your possession[otherwise] you dropped in the [location of the space-o-lube brochure][end if]."
	
The description of the space-o-lube brochure is "The brochure simply says:[paragraph break][fixed letter spacing]SPACE-O-LUBE [if the space-o-lube tube has been handled]HAS BEEN[otherwise]CAN BE[end if] FOUND IN A CARGO HOLD NEAR YOU![variable letter spacing]"

After examining the space-o-lube brochure when the port cargo hold is unvisited for the first time:
	say "Space-o-lube in the cargo bay? That's not something you've ever stocked, why would that be down there. 'Johnson', you think to yourself. Even though he's 10 000 light years away, he's probably got something to do with this."  


Instead of putting the space-o-lube tube on the stuck armoury door:
	now the armoury door is lubricated;	
	now your feet are oily;
	now the space-o-lube tube is empty;
	say "You squirt the lubricant onto each corner of the door, accidentally spilling some over your shoes in the process[if the player has the small lemon-scented moist hand towel]. Thank god you have your small lemon-scented moist hand towel to wipe it up with[end if]."

Instead of putting the space-o-lube tube on an inoperable doorway(called target):
	say "Technically, that door is unpowered, and not jammed, so the space-o-lube would probably do nothing.";

Instead of putting the space-o-lube tube on a doorway(called target):
	say "The [target] is in no need of space-o-lube."
	
Understand "squirt [space-o-lube tube]" as squeezing.
	
Instead of squeezing the space-o-lube tube:
	if the player is in the top deck aft corridor:
		if the space-o-lube brochure has been handled:
			try putting the space-o-lube tube on the armoury door;
		otherwise:
			continue the action;
	otherwise:
		say "It makes no sense to waste this in a place with no jammed doors."

Rule for printing the name of the space-o-lube tube while taking inventory:
	say "[if the space-o-lube tube is full]tube of space-o-lube[otherwise]empty tube[end if][if the foxstar note is part of the space-o-lube tube], with the envelope still attached to it"
	
Understand "empty scrunched up tube" or "empty tube" as the space-o-lube tube when the space-o-lube tube is empty.
		
Instead of squirting the space-o-lube tube on the armoury door:
	try putting the space-o-lube tube on the armoury door.
	
Your feet can be oily.

Understand "shoe" or "shoes" or "boot" or "boots" or "your shoes" as your feet.

Instead of examining your feet:
	if your feet are oily:
		say "Damnit! Try as you might, you just couldn't prevent oil from spilling on your shoes.";
	otherwise if your feet had been oily:
		say "Ahhhhh, nice and clean again.";
	otherwise:
		continue the action.
	
Instead of rubbing oily your feet when the small lemon-scented moist hand towel is carried:
	say "You clean up your shoes with the lemon-scented hand towel.";
	now your feet are not oily.

Instead of using the small lemon-scented moist hand towel on the oily your feet:
	try rubbing the second noun.

Instead of wiping oily your feet with the lemon-scented hand towel:
	try rubbing the noun.


Section - Guns, racks, and firelocks

The Gun Rack is scenery in the Armoury. "Whoa, nice rack. It's full of Pacifist MK3 Rifles."

Instead of taking the Gun Rack: say "There are row after row of guns here: you'd never be able to carry around an entire racks worth of them."

The Pacifist MK3 Rifle is part of the gun rack. The description is "[if we have not examined the Pacifist MK3 Rifle]After years of experience you've learned the most important rule of running a space faring vessel engaged in peaceful trading - which is to carry sufficient weapons to start a small interstellar war. Y'know, just in case.

Before they opened up independent trading outside of the corporations, one trading body operated under the motto: 'Just In Case'. Advertising executives had decided it contained just the right level of spunky get-up-and-go they needed to operate in an increasingly competitive interstellar trade industry. The phrase fell into disrepute when a small trading vessel delivering popcorn to a gas giant in the Barulon IV system found themselves at the centre of a minor dispute over the application of a local import tax. In the ensuing firefight, 2500 people were killed, and 15 containers of perfectly good popcorn were vented into space. This incident ended the corporate monopoly over space trade and inspired laws governing the kind of weapons that non military personnel could carry in space.

Now the standard legal shipboard killing equipment is the new PACFIST MK3 rifle. As a safety precaution all PACIFIST MK 3[']s are equipped with a safety mechanism, which will only allow the safe release of murderous heated plasma bullet hell when the brain of the operator genuinely believes they are facing serious danger, thus mitigating the accidental risk of vaporising the population of a small village over a corn snack pricing disagreement.[otherwise]The PACIFIST Assault Rifle, a weapon designed to terminate organic and non-organic lifeforms with extreme prejudice."

Understand "pacifist rifles" or "rifles" as the pacifist mk3 rifle.

Before taking the Pacifist MK3 when the pacifist MK3 is part of the gun rack:
	move the Pacifist MK3 to the armoury.
	
Instead of pulling the pacifist MK3 when the pacifist MK3 is part of the gun rack:
	try taking the pacifist mk3.


Section - The Harpoon Gun

The harpoon gun is in the armoury. "You also notice a small harpoon gun, which you vaguely recall Hudson buying before you spent a week trading at that ocean world. The captain of the Valerian had once warned you that the beautiful sea creatures there frolic and dance in the shimmering waters, with singing so hypnotic and mesmeric that visitors taking a dip in the azure sea would often forget the need to swim, and drown. So this near perfect and tranquil world has now become the holiday destination of choice for the interstellar traveler who delight in tormenting and killing local wildlife with gas powered harpoons while looking for a healthy dose of revenge."The harpoon gun can be connectable. The harpoon gun is connectable. The harpoon gun can be sticky. The harpoon gun is not sticky.

Before printing the name of the sticky harpoon gun:
	say "plungerified "

Instead of examining the harpoon gun: say "The harpoon gun is made of an alloy you don't recognise. It shines with a deep turquoise sheen. The trigger and grip are a golden colour, as are the harpoons themselves. The fact that the weapon could cause such devastating damage to organic life at ranges of up to 40ft lends a disturbing edge to the otherwise simple beauty of the object."


Chapter - The Bridge

[All content for this location is should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Bridge

]

Section - Location Description

The Bridge is a room.
The description is "[if unvisited]The first thing you notice about the bridge is the unnerving absence of sound; normally there's all sorts of chatter as you and your crew ply your trade across the known cosmos, discussing such matters as interplanetary politics, the lack of reasonable disaster recovery procedures, and defunct confectionery brands due for revival. Even with the crew gone, there should be a pleasant hum of the ship's machinery keeping you alive, warm and moving. The cold, still silence feels deeply unnatural.

[end if]The nerve centre of the entire ship, and by extension your livelihood. You see the captain's chair, the viewscreen, the navigation terminal, the communication terminal, the weapons terminal, the Internal ship status terminal, and the exit.".

Instead of exiting in the Bridge when the holder of the player is the Bridge:
	try going aft.
	
Does the player mean doing something with the bridge door in the top deck fore corridor when the bridge door is closed:
	it is likely.


Section - The Bridge Door

Instead of going nowhere from the Bridge, say "The only exit is to the aft, which leads back out to the top deck corridor.".

The bridge door is a doorway. The bridge door is fore of the Top Deck Fore Corridor and aft of The Bridge. The bridge door is manual. The bridge door can be activated. The bridge door is not activated.

The description is "[if bridge door is closed]The amount of trouble that door's put you through today........[otherwise]It's open, leading to the top deck corridor[end if]".

Understand "exit" as the bridge door.


Section - The Bridge Door

The bridge door is unopenable.

Does the player mean doing something to the captain's quarters door when the player is in the Top Deck Fore Corridor: it is unlikely.

Instead of examining the bridge door in the Top Deck Fore Corridor:
	if the bridge door is open:
		say "The door is open, having recessed into its housing and almost vanished completely, and the LED lights surrounding it are now glowing green.";
	otherwise if the bridge door is not openable:
		say "The bridge door is constructed of the latest nanosteel foam, and its surface is pitch black, seeming to drink in the[if top deck fore corridor is not fully powered] minimal amount of [end if] light shining on it. [if the bridge door is not activated]It's surrounded by deep [LED lights] indicating an emergency shutdown. [end if]Immediately to the left of the bridge door is [if bridge door is not activated]your recently installed [otherwise]the[end if]standard spec retinal scanner, controlling access.";
	otherwise:
		continue the action.
		
Instead of opening the bridge door in the Top Deck Fore Corridor:
	if the bridge door is not openable:
		say "The door is in a state of emergency lockdown. Nevermind, as Captain of the ship, you should be able to override the lockdown using the retinal scanner.";
	otherwise:
		continue the action.


Section - Ways to not open the Bridge door

Instead of putting something on the closed unopenable bridge door:
	try using the noun on the bridge door.
	
Instead of unlocking the closed unopenable bridge door with something:
	try using the second noun on the bridge door.	
	
Instead of using the spanner on the closed unopenable bridge door:
	say "You try to find a gap to the spanner into to lever open the door, but there doesn't seem to be one."
	
	Instead of doing it for the second time:
	say "Frustrated, you smash the door repeatedly with the spanner but it doesn't open. You do feel less frustrated though."

Instead of hitting the closed unopenable bridge door with the spanner, say "You whack the door a couple of times hoping to jolt the thing out of its emergency lockdown status, but nothing happens."
	
Instead of using the statue on the closed unopenable bridge door, say "You hold out the statue in front of the door, hoping that zod might call upon the powers of Janus to help you open it, but nothing happens."

Instead of hitting the closed unopenable bridge door with the statue:
	say "You raise the statue to attack, but just as you're about to strike the door, you feel a sharp stinging pain in your hand, dropping the statue.";
	silently try dropping the statue.

Instead of using the plush towel on the closed unopenable bridge door, say "'How dare you deny me access -- I'm the boss!' you rage before attempting to beat the door within an inch of it's life using the plush towel. 'And ... let that be a ...... lesson to you!' you wheeze before attempting to open the door. It's still locked."

Instead of hitting the closed unopenable bridge door with the plush towel:
	try using the plush towel on the bridge door.
	
Instead of using the hanger on the closed unopenable bridge door:
	say "Damnit! You can't find a gap in the door small enough to fit the hanger into. You don't think levering this open is going to work."
	
Instead of hitting the closed unopenable bridge door with the hanger:
	say "You hold the hanger out in front of you like a rapier and thrust. Then you balestra forward and swipe but the bridge door doesn't even respond to parry. It just stands there, still in a state of emergency lockdown. What a spoilsport."
	
Instead of using the plunger on the closed unopenable bridge door:
	say "You jam the plunger onto the bridge door, sticking it, then start pulling. The plunger just unsticks. You try again. Then again but each time the plunger just keeps unsticking. You eventually concede that the plunger simply isn't up to the job."
	
Instead of hitting the closed unopenable bridge door with the plunger:
	try using the plunger on the armoury door.
	
Instead of using the can of packing foam on the closed unopenable bridge door:
	say "You start squirting the foam on the door but then stop when you realise that covering the it in packing foam isn't going to help open it up. You'd probably just be left with a really foamy door." instead.
	
Instead of spraying the can of packing foam over the closed unopenable bridge door:
	try using the can of packing foam on the bridge door.
	
Instead of using the packing knife on the closed unopenable bridge door:
	say "Yes the material that the bridge door is made of is called [italic type]nanosteel foam[roman type] but that's really just another name for a highly advanced kind of metal. Cutting the door with a knife designed to only cut [italic type]soft[roman type] foam isn't going to work."
	
Instead of hitting the closed unopenable bridge door with the packing knife:
	try using the packing knife on the armoury door.
	
Instead of cutting the closed unopenable bridge door with the packing knife:
	try using the packing knife on the armoury door.
	
Instead of using the string on the closed unopenable bridge door:
	say "Using some string to open the bridge door simply isn't going to work -- how could it?"
	
Instead of hitting the closed unopenable bridge door with the string, say "You bat the bridge door as viciously as you can with the string but the door doesn't succumb."

Instead of using the small lemon-scented moist hand towel on the closed unopenable bridge door:
	say "You wipe the bridge door with the scented towel. You have achieved nothing...aside from making the bridge door ever so slightly lemony fresh."
	
Instead of hitting the closed unopenable bridge door with the lemon-scented towel, say "You unleash seven shades of lemon scented fury on the door but it doesn't open."

Instead of hitting the closed unopenable bridge door with the hammer:
	say "You batter on the bridge door as hard as you can with the hammer, but the door's simply too strong to be battered open."
	
Instead of using the hammer on the closed unopenable bridge door:
	try using the hammer on the bridge door.
	
Instead of headbutting the bridge door:
	say "You charge at the door, head down, determined to break through to the other side but only succeed in bouncing off and making yourself very dizzy."
	
Instead of using the helmet on the closed unopenable bridge door when the helmet is worn:
	try headbutting the bridge door.
	
Instead of using the pliers on the closed unopenable bridge door:
	say "There's nothing suitable to cut on the bridge door. No ' override emergency lockdown' wire or anything."

Instead of using the whisk on the closed unopenable bridge door:
	say "You start the whisk rotating using both hands and advance towards the door hoping to drill a hole in it but the whisk just flies out of your hands on making contact.";
	silently try dropping the whisk.
	
Instead of using the bicycle repair kit on the closed unopenable bridge door:
	say "That probably isn't going to work. A bicycle repair kit is usually used for sealing punctures, not unlocking doors."
	
Instead of hitting the closed unopenable bridge door with the whisk:
	try using the whisk on the bridge door.
	
Instead of using the mini fuel canister on the closed unopenable bridge door:
	say "You stand for a second, trying to think of a possible way to use the mini-fuel canister to open the door but can't think of anything. The fuel canister probably serves another more useful -- more obvious -- purpose."
	
Instead of hitting the closed unopenable bridge door with the mini fuel canister:
	say "There may be tiny possibility that upon striking the door with the fuel canister it would explode and disintegrate it but there are two nagging doubts about that plan that stop you from attempting it: [paragraph break]1: This mini fuel canister probably serves another more important purpose.

2: As well as disintegrating the door, you'd probably also be disintegrated yourself."

Instead of hitting the closed unopenable bridge door with the mini fuel canister for the second time:
	say "What the hell! You grab the mini fuel canister and smash it on the ...";
	change the armoury door to not stuck;
	end the game saying "You've been disintegrated but if it's any consolation, at least you managed to get the bridge door open."
	
Instead of throwing the mini fuel canister at the closed unopenable bridge door:
	say "You stand back to a safe distance and bowl a googli at the bridge door with the canister. As expected the canister explodes, flashing a blinding white light over the corridor, forcing you to cover your eyes. You turn to face the door expecting it to be no more but it's still there. It withstood the blast! You really hope you haven't just wasted a vital item, and left yourself to living a doomed, inescapable, existence.";
	remove the mini fuel canister from play;

Instead of using the auroscope on the closed unopenable bridge door:
	if the auroscope is switched off:
		say "(first switching on the auroscope)[command clarification break]";
	say "You shine the light on the door hoping that the beam from it (in addition to the light from the corridor itself) might be strong enough to burn a whole in the door but nothing happens."
	
Instead of hitting the closed unopenable bridge door with the auroscope:
	say "You'd better not. The torch is your only protection from space grues at the moment."
	
Instead of using the shovel on the closed unopenable bridge door:
	say "You whack the door with the shovel, sending reverberations up your arm causing your to drop the shovel, but the door doesn't open.";
	silently try dropping the shovel.
	
Instead of using a brochure on the closed unopenable bridge door:
	say "You can't open a stuck door with a brochure, that's ridiculous; however, the brochure might be advertising a product that can open another door. A more stucky door."


Section - Captain's Chair

The captains chair is a chair.
The captains chair is in the Bridge.
The captains chair is scenery.
The description of the captains chair is "Your seat, pardon the pun, of ultimate power on the ship. Height adjustable and well padded as to make it more comfortable than all other chairs on the bridge, which often leave the rest of your crew squirming as if they're towards the end of a 3 hour film. You had it embroidered with your name in a gold swirling script which yells importance. To be honest it makes you beam with pride and achievement just looking at it.".

Understand "chair" or "captains" or "captain" or "captain's" or "seat" as the captains chair.

Before entering the captains chair, say "You relax into the comfortable chair, savouring your brief repose after an arduous day's work.".


Section - Communication Terminal

The communication terminal is a prop in the bridge.
The description is "Your ship's link to the outside world, and the most boring seat on the bridge. Usually manned by Johnson, the ship's flunky. From here you can transmit messages deep into space. If it wasn't for the dodgy scanner, you could probably have used this to send out a distress signal, and avoided today's hardships. The switch to activate the automated distress signal is so simple even you can use it; it says off, or on.".

Understand "communication" or "comms" or "comm terminal" as communication terminal.

The signal switch is a device.
The signal switch is part of the communication terminal.

Understand "comm switch" or "sos switch" or "automated distress signal" or "distress signal" or "distress" or "signal" as signal switch.

Understand "activate [something]" as switching on.
Understand "deactivate [something]" as switching off.

After switching on the signal switch for the first time:
	say "You flick the switch to activate the automated distress signal, which starts broadcasting on all frequencies: 'M'aidez, m'aidez, m'aidez, currently in need of assistance at these co-ordinates. Any ships in the area, please render assistance as soon as possible.' You sigh, that would've been really useful at the start of this crisis. C'est la vie.".

Before switching on the signal switch for the second time:
	say "It's still broadcasting your now redundant cry for help.";
	stop the action

After switching on the signal switch for the second time:
	say "You flick the switch to activate the automated distress signal, which starts broadcasting on all frequencies: 'M'aidez, m'aidez, m'aidez, currently in need of assistance at these co-ordinates. Any ships in the area, please render assistance as soon as possible.'".

After switching off the signal switch:
	say "You switch off the automated distress signal.".


Section - Internal Ship Status Terminal

The internal ship status terminal is a prop in the bridge.
The description is "This is the console Helen uses when she's not in engineering to monitor the ship's systems. The top of the terminal is a copy of the Ship Status Monitor in your quarters. [ship status]".

Understand "internal status" or "status display" or "internal" or "ship status" or "status terminal" or "ship terminal" as the internal ship status terminal.

Instead of taking the internal ship status terminal, say "As handy as it would be to be able to carry the monitor around, it's simply not portable.".

Instead of attacking the internal ship status terminal for the first time:
	say "You give the terminal a thrusting thump with the outside of your clasped hands, and as you watch the screen flicker and fade to black, you realise something: there was absolutely no good reason to try and damage such an expensive piece of equipment. Fortunately, after a few seconds, the screen starts to light back up again, and you breathe a sigh of relief. You vow never to try and smash the terminal again.".
	
Instead of doing it for the second time, say "Sorry, but you don't want to break the terminal, or your vow.".
		
Instead of attacking the internal ship status terminal:
	say "No need for such a pointless piece of vandalism.".


Section - Navigation Terminal

The navigation terminal is a prop in the bridge.
The description is "The navigation terminal consists of a joystick, which resembles something from an old video game, with no fewer than five buttons, auto-fire and an LCD clock/stopwatch combo. The joystick is used for manual maneuvering and has saved the day many a time when the ship has encountered an asteroid field. The other buttons are used to activate and control the engines[if ignition button is switched off]; at the moment, the ignition button looks mighty inviting.[end if] ".

Understand "navigation" or "nav" or "nav terminal" or "buttons" as navigation terminal.

The ignition button is a device.
The ignition button is part of the navigation terminal.

Understand "ignition" or "engine start" or "engine" or "engine button" or "engines" or "engines button" as ignition button.

Understand "start [ignition button]" as switching on.

Instead of pushing ignition button: 
	try switching on ignition button.

Before switching on the ignition button:
	if repairing the engines has ended:
		say "You hold your breath in anticipation as you hit the big red ignition button. For a few moments nothing happens and you wonder what else is wrong, then suddenly the whole ships begins to gently rock and shake as the engine's ignite. Eventually it settles to a calm rumble and on the view screen you can see movement, slowly picking up speed. You've done it, you're on your way back to port. The automatic guidance should see you the rest of the way. Now all you need is some sleep.";
		record "firing up the engines" as achieved;
	otherwise:
		say "You hold your breath in anticipation as you hit the big red ignition button. Guess you haven't fixed the engines yet because nothing is happening, best get down to the engine room." instead.
		

Report switching on the ignition button:
	stop the action.

Before switching off the ignition button:
	say "Now you got the engines started again, now might not be the time to switch them off again.";
	stop the action.

The joystick is a part of the navigation terminal.

Instead of pulling the joystick, try pushing the joystick.

Before pushing the joystick:
	say "No matter how much you play with the joystick, nothing happens...because you haven't switched the engines on yet.";
	stop the action.

Instead of pushing the joystick:
	say "[if ignition button is switched on]You've set the navigation controls to auto-pilot, and you're too tired to fly the ship home manually. Time for bed maybe.[otherwise]Since the engines are switched off, that's not going to achieve anything.[end if]".


Section - Weapon Terminal

The weapon terminal is a prop in the bridge.
The description is "The weapon terminal is made up of lots and lots of colourful buttons, pressing them results in lots of big colourful bangs. You don't need ship to ship weaponry very often but when you do Hudson always gets far too much pleasure out of it for your liking.".

The w_buttons is a device.
The w_buttons is a part of the weapon terminal.
The printed name of the w_buttons is "weapons buttons". 

Understand "weapons terminal buttons" or "weapons" or "weapon buttons" as w_buttons.

Understand "fire [w_buttons]" as switching on.

Instead of switching on w_buttons:
	say "[if ignition button is switched on]Considering for a moment the cost associated with each button press you decide you're not going to waste precious ammunition, even if the occasion does warrant a grand firework display. You'll celebrate tomorrow. Now, it's time for bed.[otherwise]Wrong terminal, you've got to restart the engines if you want to get out of here.[end if]".


Section - Viewscreen

The viewscreen is a prop in the bridge.
The description is "Upgraded only last month your viewscreen is a marvel of cutting edge holography and certainly wouldn't look out of place in the home of an Intergalactic Premiership Blitzball star.".

Understand "view" or "screen" as viewscreen.


Chapter - The Briefing Room

[All content for this location is taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Briefing_Room&oldid=6097

]

Section - Location Description

The briefing room is a room. 
The description is "[if unvisited]You have often wondered why your relatively cheap interstellar trading vessel came fitted with a briefing room. By-and-large the complexity of interstellar trade boils down to picking up Goods 1 at Point A and transporting to Point B without dying of boredom en route. Occasionally there is a requirement to collect Goods 2 or Goods 3 from Point C or D before reaching Point B, but Commander Suze usually deals with all the complex planning and navigation surrounding this. Therefore the Briefing Room's rather attractive imitation oak table and comfy looking seats have largely been appropriated for the ship's weekly gambling activities and film nights.[otherwise]The Briefing Room's rather attractive imitation oak table sits in the middle of the room.[end if]

At the starboard end of the table stands a whiteboard. Invariably, the pens have all been left without their tops on, and have all dried out.[if unvisited] You make a mental note to throw the whiteboard out of the airlock and order some new pens after the current crisis is resolved.[end if] 

A large and very impressive map of the Western Spiral arm of the galaxy adorns the fore wall. Port leads back to the top deck corridor."

Instead of exiting in the Briefing room when the holder of the player is the Briefing Room:
	try going port.


Section - The briefing room door

The briefing room door is a doorway. The briefing room door is starboard of the Top Deck Fore Corridor and port of The Briefing Room.

Instead of examining the briefing room door in the Top Deck Fore Corridor:
	say "It's made of a thick metal, much like the rest of the doors on the ship. There is a piece of paper cellotaped to it." 

Instead of examining the briefing room door in the briefing room:
	say "This sturdy ships door has a cheap brass plaque on it that reads 'Briefing Room' and a small porthole style window to look through." 
	
Instead of searching the briefing room door, say "Through the porthole, you make out [the other side of the briefing room door]."

Instead of going nowhere from The Briefing Room, say "The only exit is to the port, which leads back out to the top deck corridor."

Instead of going starboard from The Briefing Room, say "You bump into the whiteboard. You probably meant to go to port, since that's the only exit."


Section - The White board

A white board is prop in the Briefing Room. It can be clean. It is not clean. 

The description is "The whiteboard has a large rectangular middle section and fold out panels on either side. [if not clean]A half completed game of hangman fills the middle board.[else] The board has been cleared and is ready for use."

Understand "whiteboard" or "panel" or "panels" or "fold out panels" as the white board.

instead of taking the white board:
	say "That's not going to help you save the day.";

Instead of rubbing the white board:
	now the white board is clean;
	say "With no cloth at your disposal, you rather slobbishly rub the board with the sleeve of your spacesuit, cleaning the board."

Instead of rubbing the white board when the board is clean:
	say "That's already clean."

Writing on is an action applying to one thing.

Understand "write on [something]" as writing on.

Check writing on:
	if the noun is not the white board:
		say "That's not something you can write on.";

Instead of writing on the white board:
	say "You don't have a pen, and in any case, this isn't the time for [if white board is not clean] playing hangman [otherwise] planning trade routes or drawing a poker scoreboard[end if]."

The game of hangman is part of the white board. The description is "[if the white board is clean]The game of hangman has been erased.[otherwise]The game's been ended with the man hung, and the board reading: [paragraph break][fixed letter spacing]C _ n _ a _ _ _ _ _ i o n[variable letter spacing][line break]"

Understand "hangman" or "game" as the game of hangman.


Section - The Galaxy Map

A galaxy map is a scenery supporter in the Briefing Room. 

Understand "map of the western spiral" or "western spiral" as the galaxy map.

The description is "[if a random chance of 1 in 10 succeeds]You bought this map for a tidy sum from an orbital bazaar in the Enigma Terra system. The salesman convincingly argued it was an authentic map marking the exact resting place of the famous intergalactic highway man, Noybert Feres. The treasure map inflamed your greedy eyes, and after buying enough supplies for an arduous four month trek to Verboten, you told the crew that the ship was bound for the pleasure moon called Electric Snow, knowing full well your destined zone. But before you began the journey, you encountered a wizened old crone, with claw for a hand, and eyebrows of unripened corn, who said to you -- stentorian of voice -- 'You head for Verboten? For what? Porpoise ?' 'Porpoise...no! ' You replied to her, 'I'm after the bones of that famous Scot, Noybert Feres...and all he's got. 'Actually he was spanish,' cut in the crone, quickly. 'Scottish, spanish, your tangenital tactics won't throw me off my course....wait how did you know where I was headed, anyway?' 'Oh, you've got one of those worthless maps sticking out of your satchel Gnark sells to tourists, peanut-brains, and greedy so and so's. And with that she disappeared into a puff of smoke.[otherwise]The impressiveness of the map is diminished slightly by a large cigarette burn that has eliminated most of the Tau Ceti region, and a large, anatomically incorrect drawing of a buxom space maiden scrawled on it in black marker pen."

Instead of taking the galaxy map, say "It doesn't seem likely a damaged space map is going to help repair the ship."

A drawing of a space maiden is part of the galaxy map. The description is "A drunken attempt by Johnson to draw Miss Mars '89. Looking at the picture it's clear he's a little unacquainted with alien anatomy."

Understand "anatomically incorrect drawing" as the drawing of a space maiden.

A cigarette burn is part of the galaxy map. The description is "No doubt commander Suze's doing -- she smokes like a chimney. It was caused when you flopped a doozy when playing galactic hold'em against her, beating her three naked zorgians of a kind. She's always been prone to fits of anger."; 


Section - Gas Cylinder 3

gas cylinder 3 is a gas cylinder.
gas cylinder 3 is on the oak table.
After examining not handled gas cylinder 3, say "This one is currently being used as a paper weight.".


Section - The marker pens

Some dried marker pens are scenery.  Some dried marker pens are here. "An assortment of marker pens in black, blue, and every teachers favourite, red."

Instead of smelling the dried marker pens, say "You raise one of the markers to your nose, bracing yourself for that strangely satisfying inky scent. Sadly with your helmet in the way you get nothing."

Instead of taking the dried marker pens, say "They're all dried out. Not a working pen amongst the lot."

Understand "pen" as the dried marker pens.


Section - The oak table

An oak table is here.  An oak table is scenery.  "It's a cheap looking imitation oak table with a circular tabletop, complete with four pairs of makeshift poker chip holders.[if something not handled is on the oak table][oak-table-state].".

Instead of taking the oak table, say "It's not fixed to the floor, it's just really, really heavy".

Understand "tabletop" or "circular tabletop" or "imitation oak table" or "imitation table" as the oak table.

Four poker chip holders are part of the oak table. The description is  "Four pairs of recessed, rounded holes. Carved rather carelessly into the table's surface."

Instead of taking poker chip holders, say "It's just a recessed hole, you can't take it with you".

To say oak-table-state:
	if the not handled pack of playing cards is on the oak table and the not handled gas cylinder 3 is on the oak table:
		say " Scattered on the table is are some rather risqué playing cards and a gas cylinder";
	otherwise if the not handled pack of playing cards is on the oak table:
		say "  Scattered on the the table are some rather risqué playing cards";
	otherwise if the not handled cylinder 3 is on the oak table:
		say " A gas cylinder lies on the table"
		
Some chips are scenery in the Briefing room. The description is "There are no chips. One of the crew must have taken them before going on shore leave."

Instead of doing something with the chips, say "The chips are long gone. All that's left are the chip holders."


Section - The comfy chairs

Some comfy chairs are a chair in the briefing room. The comfy chairs are scenery. The description is "They look comfy.";

Understand "seat" or "seats" as the comfy chairs.

After entering the comfy chairs, say "Looks can be deceiving, these chairs are horrible -- things are poking you in all your sensitive areas.";


Section - The playing cards

A pack of playing cards is on the table. The description is "A deck of rather naughty playing cards that you use for your weekly poker game. They appear to show rather artistic sketches of naked figures of four alien types (one for each suit) in what you assume to be erotic poses. You are not sure if they are male or female."

After taking the cards, say "Naked Zorgians are scattered all over the place. You gather the cards up bashfully and pop them in your pocket hoping they will provide entertainment at some later point... although you doubt it. Your personal tendency is towards homo-sapiens...."

After dropping the cards, say "With a heavy heart, you drop the pack of 'artistic' playing cards."

Before throwing the cards at something, instead say "You'd like to hurl the cards through the air with the skill of a ninja, but since you have no such shinobi skills and the cards would just fall to the ground limply, you decide not to bother."


Chapter - The Captain's Quarters

[All content for this location is taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Captain%27s_Quarters&oldid=6099

]

Section - Location Description

The Captain's Quarters is a room. 
The description is "[if unvisited]You're in your room, the grandly-titled 'Captain's Quarters'; double the size of a regular rack, and no sharing. The mostly gun-metal grey walls aren't the most welcoming environment, but after six years it's the one place in the galaxy you consider to be 'home'.

[end if]To the fore of the quarters, next to the ceiling, is the [ship status monitor][if functional fuse is not in  the fore fusebox], currently non-operational[end if]. Below this is a mound of chaos you call your desk and chair, with an ageing computer terminal on top. Just to the right of the desk is a[if fore fusebox is open]n open[otherwise] closed[end if] fusebox[if functional fuse is in fore fusebox], powering the terminal and [ship status monitor].[otherwise].[end if]

To the port of the quarters is your recently-vacated bunk[if the mattress is on the captain's bunk], with fairly worn mattress[end if]. Above this is a large porthole, with a stunning view of bugger all. The fore wall is mostly taken up with your books and media shelves and the starboard wall is dominated by a print of an old earth painting by Bridget Riley, surrounded by various pictures of family and past crew. To the aft lies access to the en-suite. "

Instead of going nowhere when in the Captain's Quarters, say "The only exits are the [captain's quarters door] to the starboard, and the en-suite to the aft."

Instead of exiting in the Captain's Quarters when the holder of the player is the Captain's Quarters:
	try going starboard. 


Section - The Captain's Quarters Door

The captain's quarters door is port of the Top Deck Fore Corridor and starboard of the Captain's Quarters. 
It is an unopenable doorway. 
The captain's quarters door is not scenery. 
The captain's quarters door is manual. The captain's door can be discovered. The captain's door is not discovered.

Understand "big metal door" or "big metal panel" or "non-responsive door" or "metal door" as the captain's quarters door.

Rule for writing a paragraph about the discovered captain's quarters door:
	if the location is the Captain's Quarters:
		set the locale priority of the captain's quarters door to 1;
		say "To the starboard is the[if the functional fuse is not in the charred fusebox] non-responsive[end if] [if the captain's quarters door is closed and the door is openable]closed [otherwise if the door is openable]open [end if]door to the rest of the stricken ship.";
	otherwise:
		set the locale priority of the captain's quarters door to 0.
		
Before opening or examining the captain's quarters door for the first time:
	now the captain's quarters door is discovered.
		
Rule for writing a paragraph about the not discovered captain's quarters door:
	say "To the starboard is the door to the rest of the stricken ship."

Instead of examining the closed unopenable captain's quarters door when the charred fusebox is not in the captain's quarters:
	move the charred fusebox to the Captain's Quarters;
	say "A big metal door that refuses to move. Just to the right of it you think you see the source of the trouble; a [charred fusebox].".
		
Instead of examining the closed captain's quarters door:
	say "A big metal door. Closed.".
	
Instead of opening the unopenable captain's quarters door:
	say "[if closed]It's once again stuck shut.[otherwise]It's already open.[end if]".
	
Instead of closing the unopenable captain's quarters door:
	say "[if closed]That's already well and truly closed.[otherwise]With no power going to the door, you can't close it.[end if]".

Instead of opening the closed unopenable captain's quarters door:
	if the captain's quarters door has not been openable:
		now the charred fusebox is in the Captain's Quarters;
		say "You tap the open button, but it still stays solidly in place. There is a [charred fusebox] nearby... looks like the power is out to the door's servo mechanism.";
	otherwise:
		say "You tap the open button, but it still stays solidly in place. The power is out to the door's servo mechanism again.".

Instead of attacking the captain's quarters door:
	say "[if the captain's quarters door is open]Since the door is open, there's nothing to attack.[otherwise]It's 3 inches of solid steel. You're not going to be able to break it down.[end if]".
	
Instead of hitting the closed captain's quarters door with the second noun:
	say "You hit the [captain's quarters door] with the [second noun] but it barely even causes a scratch. Trying to force the door open directly just isn't going to work.".


Section - Fore fusebox and the functional fuse

The fore fusebox is in the Captain's Quarters.  The description is "A small jet-black box, measuring about 4 inches wide and 6 inches high. Currently closed. [if we have not examined the fore fusebox] This controls the power to your ever-so-important solitaire terminal and ship status monitor."
The fore fusebox is a fusebox.
Inside the fore fusebox is a functional fuse.
The functional fuse is a fuse. 

Understand "closed [fore fusebox]" as the fore fusebox when closed.
Understand "open [fore fusebox]" as the fore fusebox when open.

After opening the fore fusebox for the first time:
	say "You open the fusebox.[paragraph break]";
	try examining the fore fusebox.

Instead of examining the fore fusebox when open:
	if the functional fuse is in the fore fusebox:
		say "It contains a fully functional fuse, powering the [ship status monitor] and the terminal.";
	otherwise:
		continue the action. 
		
[ -----> FUNCTIONAL FUSE]

The description of the functional fuse is "An old style cartridge fuse with [']Made in Britain['] written on it.[if functional fuse is in the fore fusebox] Currently powering the status monitor and terminal." 

Understand  "working fuse" or "cartridge fuse" or "british fuse" as the functional fuse. 

Understand "use [functional fuse] in/on [charred fusebox]" as inserting it into.

Understand "fit [a fuse] into/in/inside [a fusebox]" as inserting it into.

Before taking the functional fuse:
	if the fuse was in the fore fusebox:
		say "As you remove the fuse, the status monitor and the terminal go dead.";
	otherwise if the functional fuse was in the charred fusebox:
		now captain's quarters door is unopenable;
		say "As you remove the fuse, the LED at the top of the fusebox goes out.";
	otherwise:
		continue the action. 
	
After inserting the functional fuse into the second noun:
	if the second noun is the charred fusebox:
		say "As the working fuse slips into place, a tiny LED lights at the top of the panel. The door is [if captain's quarters door has not been openable]now fixed[otherwise]fixed again[end if].";
		now the captain's quarters door is openable;
	otherwise if the second noun is the fore fusebox:
		say "As you put the fuse back in the fusebox, power is returned to the status monitor and terminal.";
	otherwise:
		continue the action.
		
Before inserting the functional fuse into the open charred fusebox when the melted fuse is in the charred fusebox:
	say "(first removing the melted fuse)[command clarification break]";
	silently try taking the melted fuse;

Instead of eating the functional fuse, say "If your plan is to eat this in the hope that you will metamorphose into a superhero called the Fusilator, with the ability to power fuseboxes with a single touch of your finger, then I'm sorry to inform you that that probably isn't going to happen."

Instead of using the functional fuse in the Captain's Quarters when the charred fusebox is open:
	say "(putting the [functional fuse] into the [charred fusebox])[command clarification break]";
	try inserting the functional fuse into the charred fusebox.
		
Understand "insert [functional fuse]" as using.


Section - Charred fusebox and the melted fuse 

The charred fusebox is a fusebox. The charred fusebox is privately-named. The printed name of the charred fusebox is "charred maintenance panel".

Understand "charred maintenance panel" or "maintenance panel" or "charred panel" or "charred" or "panel" as the charred fusebox.

Understand "charred fusebox" as the charred fusebox.

Understand "electrical chaos" or "tangled wires" or "mess of tangled wires" or "wires" or "sparks" or "clip" or "fuse clip"  or "maintenance box" or "box" or "exposed inside" as the charred fusebox when the panel cover is on-stage.

Inside the charred fusebox is a melted fuse.

Instead of examining the open charred fusebox:
	say "Inside the maintenance box is a mess of tangled wires[if something is in the charred fusebox] and [a list of things in the charred fusebox][otherwise] and an empty fuse clip[end if]."

Instead of examining the closed charred fusebox: say "It looks like something may have blown inside; the bottom is blackened and charred. At the top, a small unlit LED signifying a power failure confirms your suspicions."

Instead of opening the closed charred fusebox, say "It's no good. Whatever's blown inside has warped the lid, preventing it from opening. Looks like you're going to have to force it."

Instead of attacking or pulling the closed charred fusebox, say "It's no good using your bare hands, you need some kind of tool."

Understand "force [charred fusebox]" as attacking.

Understand "force [charred fusebox] with/using [something preferably held]" as hitting it with.

Understand "broken fusebox" as the charred fusebox when the fusebox is open.

Instead of unlocking the closed charred fusebox with the spanner:
	say "The panel falls off as you pry it open with the [second noun] to reveal a mess of tangled wires and sparks.

Ahh, there's the problem: the fuse powering the door has blown. Inside the maintenance panel is what remains of the melted fuse.";
	smash the charred fusebox.
	
To smash the charred fusebox:
	change the charred fusebox to open;
	now the cover panel is in the Captain's Quarters;
	change the printed name of the charred fusebox to "maintenance box".

Instead of unlocking the open charred fusebox with something, say "That's already open." 

Instead of hitting the closed charred fusebox with the second noun:
	if the second noun is the spanner:
		say "You hit [the noun] with [the second noun] and it falls off to reveal a mess of tangled wires and sparks.

Ahh, there's the problem: the fuse powering the door has blown. Inside the maintenance box is what remains of the melted fuse.";
		smash the charred fusebox;
	otherwise:
		say "You hit the [charred fusebox] with the [second noun] but it barely causes a scratch. Looks like you need something else."
		
Instead of using the not stuck plunger on the charred fusebox:
	say "You stick the plunger onto the [charred fusebox], place your foot on the wall to give yourself extra leverage and start to pull. You think you feel a little give, and encouraged, you start to pull harder. The panel pulls free of its hinges and crashes to the floor.
	
Ahh, there's the problem: the fuse powering the door has blown. Inside the maintenance box is what remains of the melted fuse.";
	smash the charred fusebox.
	
Instead of putting the not stuck plunger on the charred fusebox:
	try using the plunger on the charred fusebox.
	
Instead of unlocking the charred fusebox with the not stuck plunger:
	try using the plunger on the charred fusebox.
	
Understand "stick [plunger] to/on [charred fusebox]"as using it on.

Understand "push [plunger] on/onto [charred fusebox]" as using it on.

Instead of hitting the closed charred fusebox with the hanger:
	say "The hanger is sturdy, but it's just not heavy enough to open the [charred fusebox] with."
	
Instead of hitting the closed charred fusebox with the statue:
	say "You whack the [charred fusebox] with the statue, but only succeed in making Zod angrier. The statue simply isn't large enough to damage the fusebox."
	
Instead of hitting the closed charred fusebox with the helmet when the helmet is worn:
	say "Ingenious! The man in the store told you that the helmet you're wearing was made of an unbreakable glass, and that's something you'd always wanted to test. Now is that time. You bend over near the charred fusebox, lining up your target, and slowly back up a few feet before beginning your charge! Smash! The charred [charred fusebox] lid is knocked clear off its hinges and falls to the floor with a bump. You feel your helmet carefully, checking for damage. Not a scratch. The man in the store was right.";
	now the charred fusebox is open;
	now the broken lid is in the Captain's Quarters.
	
Instead of headbutting the charred fusebox when the helmet is worn:
	try hitting the charred fusebox with the helmet.
	
Instead of hitting the charred fusebox with the plush towel:
	say "You batter the [charred fusebox] with the towel for a while, with an assault so violent that for a moment you think it may just work -- but it doesn't, towels are soft. Really soft."
	
Instead of unlocking the charred fusebox with something:
	try hitting the charred fusebox with the second noun.

[ -----> LED part of the charred fusebox ]
		
An LED is part of the charred fusebox. The description is "The LED at the top of[if the charred fusebox is open] what remains of[end if] the [charred fusebox] is [if the functional fuse is in the charred fusebox]lit up[otherwise]unlit, signifying a power failure[end if]."

[ -----> MELTED FUSE]

The description of the melted fuse is "This was supposed to be an unbreakable self-resetting thermistor fuse. You thought you'd pay extra as you didn't want to be trapped in your own quarters in the event of a power surge. It's now scorched and melted. "

Understand "fuse" or "thermistor" as "[scorched fuse]". Understand "unbreakable" or "self-resetting" or "self resetting" or "scorched" or "charred" or "melted" as  "[scorched fuse adjectives]". Understand "[scorched fuse]" or "[scorched fuse adjectives][scorched fuse]" as the melted fuse.

Instead of taking the melted fuse for the first time:
	remove the melted fuse from play;
	say "You reach into the electrical chaos, remove the melted fuse, and toss it onto the pile of junk on the desk, where it fits in perfectly."

Instead of eating the melted fuse, say "You take the banana, peel it and -- hold on -- it's is a fuse, and clearly not edible."


Section - Props

An art print, some books, some media, some paperwork, some family pictures, a large porthole, and a ship status monitor are props in the Captain's Quarters. 

[ART PRINT]

The description of the art print is "A fairly large print of one of Bridget Riley's earlier 'Op Art' paintings. It hurts your eyes, but in a good way." 

Understand  "art/print/painting/canvas/composition" or "large print" or "fairly large print" or "Op art" as "[art print]". 
understand "Bridget" or "Riley" or "Bridget Riley" or "Bridget Louise Riley" as "[Bridget Riley]". Understand "[art print]" or "[Bridget Riley][art print]" or "[art print] by [Bridget Riley]" as the art print.

Instead of taking the art print first time, say "It's hard to think of a circumstance where that may be useful; maybe if you were to meet an intergalactic space gorgon, the geometrical abstraction might provide some defense against the creature's ocular petrification, but since you haven't seen any about, lugging around a rather large painting would probably just prove to be a fruitless endeavour. Best leave it where it is." 

Instead of taking the art print, say "Sadly, you still haven't seen any space gorgons about, so there's really no point in taking this."

Instead of attacking the art print, say "You really have no appreciation for high art, do you?"

Instead of looking under, or pulling the art print, say "You look behind the painting expecting to see a safe, or a secret doorway, something that you've never noticed before, but all you see is a dull grey wall. You make a note to put something more interesting behind here someday."

[BOOKS]

The description of the books is "Your collection of mostly historical novels, a few reference works, and all twenty-five Harry Potter books. Sadly, 'Spaceship Repair and Maintenance for Dummies' isn't among them."

Understand "novel/novels/book/books/works" as "[books]".  Understand "[books]" or "collection of [books]" or "Harry Potter [books]" or "reference [books]" or "historical [books]" as the books.

Instead of taking the books, say "This isn't the time to be catching up on your reading! You've got a ship to fix!" 

[BROKEN LID - off stage]

The panel cover is a thing. "The battered panel lies on the floor next to the now exposed inside of the maintenance box." 

The description of the panel cover is "The panel is completely trashed. You shudder at the thought of having to spend to buy a new one; nevermind, you'll just dock Helen's wages for installing faulty components in the first place." 

Instead of taking the panel cover, say "There's no time to clean up the damage now, you've got a ship to fix."

Understand "smashed panel" or  or "battered panel" as the panel cover.

[MEDIA]

The description of the media is "The pile of pulpy Millennium-era period dramas. 'Millennium Office Workers', 'Love In The Age Of Narrowband', 'European Fishing Quota Blues' etc."

Understand "media/dramas/drama" or "period dramas" or  " Millennium-era period dramas" or "box set" or "box-set" or "boxset" or "complete box set" or "complete box-set" or "Millennium Office Workers" or "Love In The Age Of Narrowband" or "European Fishing Quota Blues" as "[media]". Understand "[media]" or "pile of [media]" or "pile of pulpy [media]" or "pile of pulpy [media] dramas" or "shelves" or "media shelves " as the media.

Understand "box" as the media when the charred fusebox is not open.

Instead of taking the media, say "There's no point taking these with you as you've never found anybody willing to share your love of Earth's fluorescent lit grey office cubicle days."

[PAPERWORK]

The description of the paperwork is "Maintenance reports, status reports, docking requests, shipping manifestos, it's mostly dull stuff. You do however take pride in your soon to be filed tax returns, as these contain some of the most creative and imaginative fiction you've ever produced."

Understand "paperwork/reports/requests/manifestos" or "papers" or "maintenence reports" or "docking requests" or "shipping manifestos" or "tax returns" or "junk" or "chaos" as the paperwork.

Instead of taking the paperwork, say "Sadly you can't find a 'Fix my broken ship' form to fill out, and nothing else looks helpful considering the situation."

[PICTURES]

The description of the family pictures is "A collection of memories, pinned to the wall for all to see. Family, embarrassing school snaps, graduation, the first ship you served on, your first crew pic as Captain, and the latest pic from around ten months ago. "

Understand "picture/pictures/snaps/photos/photo/photograph/photographs" or "collection of memories" or "embarrassing school snaps" as the family pictures.

Instead of taking the family pictures, say "Now's not the time for reminiscing about the past."

The latest pic is part of the family pictures. The description is "It's a picture of you, Tyler, Hudson, Johnson, and Bryan partying at Dilworth Joc's."

Instead of taking the latest pic:
	try taking the family pictures.

[PORTHOLE]

The description of the large porthole is "A beautiful vista of the nearby cosmos, brimming with infinite opportunity and excitement. Or a scattering of some god-forsaken fireballs offering nothing but an eternity of lifeless isolation. Depends on your mood."

Understand "vista" or "port hole" or "port-hole" as the porthole.

The printed name of the large porthole is "porthole"

Instead of opening the large porthole, say "Even though the porthole is modeled like a sea ship's, for safety reasons it's designed to only open when the ship is docked on a planet with a breathable atmosphere."

Instead of taking, pulling, or attacking the large porthole, say "You're supposed to be fixing the ship. Not causing more damage."

[STATUS MONITOR]

The description of the ship status monitor is "A display showing what's wrong with the ship at any given moment[if the functional fuse is in the fore fusebox], powered by the nearby fore fusebox. Currently:[paragraph break][ship status][otherwise], currently unpowered.[end if]".

Understand "display" or "status display" as the ship status monitor.

Instead of taking the ship status monitor, say "As handy as it would be to be able to carry the monitor around, it's simply not portable. In any case you've always got your helmets HUD to check the ship status."

Instead of attacking the ship status monitor when the functional fuse is in the fore fusebox for the first time:
	say "You give the monitor a thrusting thump with the outside of your clasped hands, and as you watch the screen flicker and fade to black, you realise something: there was absolutely no good reason to try and damage such an expensive piece of equipment. Fortunately, after a few seconds, the screen starts to light back up again, and you breathe a sigh of relief. You vow never to try and smash the monitor again."
	
Instead of doing it for the second time, say "Sorry, but you don't want to break the monitor, or your vow."
		
Instead of attacking the ship status monitor:
	say "No need for such a pointless piece of vandalism: it's already inoperable."
	
Instead of switching on or switching off the ship status monitor:
	say "Curiously. there is no on/off button on this device; when it's powered it's on, and when it's unpowered it's off."


Section - Containers, supporters, and enclosed items

[BUNK]

Definition: something is bedware:
	if it is the duvet then decide yes;
	if it is the mattress then decide yes;
	otherwise decide no.

A captain's bunk is in the Captain's Quarters. It is a bed. It is a scenery. The description of the captain's bunk is "Where you sleep[if a bedware thing is on the captain's bunk]. A [list of bedware things on the captain's bunk][end if]."

Understand "your bed" or "bed" as the captain's bunk.

Understand "sleep in/on/using [captain's bunk]" as entering.

Instead of entering the captain's bunk:
	if fixing the generator has not ended or repairing the engines has not ended or fixing the hull breach has not ended:
		say "[if fixing the generator has not ended]Electricity is down. [end if][if repairing the engines has not ended]Engines are down. [end if][if fixing the hull breach has not ended]There is a breach in the starboard cargo hold,[end if] and you think that this is the appropriate time to go to the land of nod?".
		
Instead of entering the captain's bunk when something that is bedware is not on the captain's bunk:
	say "What, without [a list of bedware things not on the captain's bunk], *AND* with the ship still not repaired. Tempting but no thanks."
		
Instead of using the captain's bunk:
	try entering the captain's bunk.
	
[DUVET]
		
A duvet is on the captain's bunk. The description is "This navy blue duvet is the second softest thing on the ship. [if we have not examined the duvet and we have not examined the plush towel]See if you can find the first softest thing."

Understand "navy blue [duvet]" or "blue [duvet]" or "navy [duvet]" as the duvet.

Instead of taking or pulling the not handled duvet:
	say "You grasp the near corner of the duvet, tempted to envelop yourself in its softness and curl up on the floor, but your captain's instincts won't allow you to rest until your ship is fixed."
	
Instead of using or entering the duvet:
	try entering the captain's bunk.
	
Instead of examining the duvet when the holder of the duvet is the Captain's Quarters:
	say "The second softest thing on the ship lies on one of the equally hardest things on the ship -- the floor."
	
Instead of examining the duvet when the duvet has been held by the Captain's Quarters and the duvet is on the captain's bunk:
	say "Great. Now after repairing the ship you've got to turn in to this mess."
	
Rule for writing a paragraph about the duvet when the holder of the duvet is the Captain's Quarters and the holder of the mattress is not the Captain's Quarters:
	say "Your [duvet] lies all on the floor here, all on it's lonesome."
	
Before taking or pulling the duvet when the holder of the duvet is the Captain's Quarters:
	say "You gather up the duvet, wrapping it around yourself momentarily for comfort, and gloomily dump it back on the bunk.";
	now the duvet is on the captain's bunk instead.
	
[MATTRESS]
	
A mattress is on the captain's bunk. The description is "It's white and springy, but the surface is uneven and sagging in its center."

Instead of examining the mattress when the mattress has been held by the Captain's Quarters and the mattress is on the captain's bunk:
	say "Curse you, Spaceship Captaining Guide for Dummies thief. Curse you."

Instead of examining the mattress when the holder of the mattress is the Captain's Quarters:
	say "The mattress lies doubled over in a heap on the floor."

Instead of looking under or searching the not handled mattress for the first time, say "You slide your hand under the mattress, groping around for your Spaceship Captaining for Dummies guide book but it's gone. This is bad. Somebody must have stolen it, it couldn't have just vanished; you bet Commander Suze had something to do with this."

Instead of looking under or searching the not handled mattress for the second time:
	say "You slide your hand under the mattress once more hoping that you missed the guide the first time but you still don't find anything."
	
Instead of looking under or searching the not handled mattress for the third time:
	say "Forget it. The guide is long gone. You're just going to have to handle this crisis without it. Handle this crisis...without it? As quick as a flash, you hurl the mattress across the room and frantically search the naked bunk for the missing guide. Finding nothing, you give the mattress and the duvet a vigorous shaking hoping for the damned thing to reveal itself. But still nothing. Forget it. The guide is long gone.";
	move the mattress to the captain's quarters;
	move the duvet to the captain's quarters.
	
Instead of looking under or searching the mattress:
	say "Forget. It. The. Guide. Is. Long. Gone."

Instead of taking the not handled mattress, say "Even though your inventory is capacious, it's not capacious enough for that."

Rule for writing a paragraph about the mattress when the holder of the mattress is the Captain's Quarters:
	say "That damned guideless [mattress] lies here, mocking you[if the holder of the duvet is the captain's quarters], alongside your equally guideless [duvet][end if]."
	
Instead of entering the mattress:
	try entering the captain's bunk.
	
Instead of using the mattress:
	try entering the captain's bunk.
	
[RETURNING THE MATTRESS]

Before taking or pulling the mattress when the holder of the mattress is the Captain's Quarters:
	say "You lazily pick up the mattress and unceremoniously dump it back onto the bunk.";
	now the mattress is on the captain's bunk instead.

[CHAIR]

The unusual chair is a chair in the Captain's Quarters. It is scenery. The description is "Very unusual, being four-legged, with armrests, and made from maple. You often get ribbed by the crew for buying something so eccentric, but you'd be surprised at how much more comfortable these antique pieces are than today's beanbag-on-a-toadstool affairs."; 

[DESK]

The desk is in the Captain's Quarters. It is a scenery supporter. The description of the desk is "The place where you deal with all the paperwork and red-tape that comes with the captaincy. It also doubles as a handy altar to Chaos. Your [terminal] lies[if the small statue is on the desk and the small statue has not been handled] next to [a small statue],[end if] amongst the piles of junk. At the front of the desk is [if small drawer is open]a small open[otherwise]a small[end if] drawer." 

Understand "table" or "chaos" or "altar to chaos" or "mound of chaos" as the desk.

Instead of opening the desk: try opening the small drawer.
Instead of closing the desk: try closing the small drawer.

Instead of inserting the noun into the desk:
	try inserting the noun into the small drawer.
	
Instead of searching the desk:
	if the spanner has not been handled:
		say "You don't find anything useful on the desk, although the small drawer looks more promising.";
	otherwise:
		say "You don't find anything useful."

[ -----> SMALL STATUE]

A small statue is on the desk. The description is "This is a small black statue that stands approximately 4 centimetres high. It depicts a snake's body forking into two heads, one giving you an evil glare and the other one giving you... well, a viciously evil glare. You found it in your pocket one morning, after a particularly boisterous week of shore leave. The word 'Zod' is carved into the statue's base."

The small statue can be alive. The small statue is not alive.
 
Understand "statue/zod/snake" or "snake's body" or "two heads"or "small statue" or "black statue" or "small black statue" as the small statue.

Instead of kneeling before the small statue, say "Your thoughts become jumbled, muddling, whirling round and round, dizzying and confusing. You clutch your head and suddenly, they resolve into perfect clarity. A message from Zod: Fix the damn ship and stop arsing around in [the location of the player]."

[ -----> CAPTAINS TERMINAL  ]

The captains terminal is on the desk. The captains terminal is a scenery device. 

 The description of the captains terminal is "[if the captains terminal is not powered and the captains terminal is switched on]With no power going to it, the terminal is dead.[otherwise]The little machine that keeps all your logs, and connects to other computer systems in the area. Also plays 547 different types of Solitaire. You've played them all."
		
Understand "ageing computer terminal" or "solitaire" or "computer" as the captains terminal.
	
The printed name of the captains terminal is "terminal".

Definition: the captains terminal is powered if the functional fuse is in the fore fusebox. 


Instead of examining the powered captains terminal when the captains terminal is switched on:
	say "[terminal insanity][line break][one of][line break]Even though your computer skills are pretty limited (limited to playing solitaire and inefficiently using the calculator when a real calculator would work much better), you're pretty sure that the terminal isn't meant to be displaying reams of gibberish like this.[or][stopping]";
	
Instead of playing the captains terminal:
	say "What the...this can't be happening. The terminal won't let you play solitaire anymore, it[if the captains terminal is not powered]'s completely dead.[otherwise] just keeps displaying reams of garbled nonsense. This crisis is worse than you thought."
			
To say terminal insanity:
	choose a random row in the Table of Terminal Errors;
	say "Some [one of]garbled[or]nonsensical[or]jumbled[or]mangled[or]scrambled[at random] text [one of]appears[or]flashes up[or]fills[at random] on the screen:[paragraph break][error entry]".
	
Table of Terminal Errors
error
"+++ THE GUARDIAN AI MAINFRAME +++

+++ V2.06 +++

+++ PROCESSING INPUT +++

+++ ANSWER IS YES +++

+++ PROCESS END +++ "
"+++ ALARM ACTIVATED +++

+++ CAPTAIN REPORT TO BRIDGE +++"
"+++ HAVE A NICE DAY +++

+++ SEARCHING ... +++

+++ BUSY ... +++

+++ ERROR 324 +++ "
"+++ READY +++

+++ INVALID PROTOCOL +++

+++ MEMORY OVERLOAD +++

+++ SIMULATING CRISIS SCENARIOS +++ "
"+++ COMPILING ... +++

+++ SCANNING ... +++

+++ PLEASE WAIT +++

+++ OUT OF ORDER +++ "
"+++ SCHEDULED MAINTENANCE +++

+++ THANK YOU +++

+++ PRESS ANY KEY TO CONTINUE +++

+++ DRAMATIC PAUSE +++

+++ IT'S YOUR TURN +++

+++ DAISY DAISY GIVE ME YOUR ANSWER DO +++ "
"+++ SUBROUTINE 1345.611 STACK OVERFLOW +++

+++ BUS ERROR MESSAGE START AI invades ship on top of the protocol. The pragmati****** forest recalls a recent ray. An obstructi(&^on angers ship +++near+++ the wartime. The premise plays before a dramatic)*&) gulf. Ship smashes the conservative throughout a glad research????????????? MESSAGE STOP +++ "
"+++L'AMOUR EST UN ENFANT REBELLE ELLE N'A JAMAIS JAMAIS CONNU DE LOI+++....(SONG FROM CARMEN)

+++ M0,0h50h-25v80h-25h50v-50v10h-10h30h-20v40h80v-20h-40v-20h130v40h-40v-20h40v20h80v-40h-40v40h40v20h-40h40v-20h50v-40h-40h40v20h-40v20h50v-40h20v20v-20h20v40h50h-40v-40h40v20h-40M85,30v5l-5,5 +++"
"+++JOHN DOE FAT AND SNARLING EVERY MOTHER'S SPECIAL DARLING FALLING LIKE A BULLET FROM THE SKY+++ +++A JOKE HE TOLD AMONG THE GALLOWS PLAYS OUT IN THE MIDNIGHT SHADOWS GONE IN A BLINK OF AN EYE+++"
"+++NOW THE FOOL SEEKS TO RETURN TO THE PAST, AND UNDO THE FUTURE THAT IS AKU!!!+++

+++ ALL SYSTEMS NOMINAL .. NO WAIT A MINUTE +++

+++ COMPILING DAMAGE REPORT DIAGNOSTICS +++

+++ PLEASE REPORT ANY HAZARDOUS DAMAGE OR SYSTEM MALFUNCTION TO THE CAPTAIN +++ "
"+++ THIS TERMINAL IS UNDER ELECTRONIC SURVEILLANCE, THANK YOU FOR YOUR COOPERATION +++

+++ IF (SHIP_WORKING == FALSE) THEN { WAKE_UP(CAPTAIN); } ENDIF +++

+++ IF (ALL_ELSE_FAILS == TRUE) THEN { LOOP( TRY_AGAIN } } +++

+++ FOUR AND TWENTY giinrsv CAME DOWN FROM INVERNESS; AND WHEN THE BALL WAS OVER THEa def norr tuwENTY LESS! +++ "
"+++ NEW MAIL RECEIVED SUBJECT BUSINESS PROPOSITION +++ +++ MESSAGE TEXT BEGINS +++ DEAR SIR I AM A RELATIVE OF DEPOSED PLANETARY CONSUL OF BETA ORIONIS 4 AND I REQUEST YOUR ASSISTANCE IN MOVING A LARGE AMOUNT OF MONEY FROM MY PLANETARY SYSTEM +++

+++ NEW MAIL RECEIVED SUBJECT HELLO THERE +++ +++ MESSAGE TEXT BEGINS +++ WANT TO SATISFY YOUR PLEASURE DROID EVERY TIME? CLICK HERE +++

+++ #!/bin/bash s=-<;while true;do echo -ne $s\r;s=`sed 's/->$/-<-/;s/^</>/;s/-</<-/;s/>-/->/;'<<<$s`;sleep 0.1;done +++"
" +++ NEW MAIL RECEIVED SUBJECT BUSINESS PROPOSITION +++ +++ MESSAGE TEXT BEGINS +++ DEAR SIR I AM A RELATIVE OF DEPOSED PLANETARY CONSUL OF BETA ORIONIS 4 AND I REQUEST YOUR ASSISTANCE IN MOVING A LARGE AMOUNT OF MONEY FROM MY PLANETARY SYSTEM +++

+++ NEW MAIL RECEIVED SUBJECT HELLO THERE +++ +++ MESSAGE TEXT BEGINS +++ WANT TO SATISFY YOUR PLEASURE DROID EVERY TIME? CLICK HERE +++

+++ #!/bin/bash s=-<;while true;do echo -ne $s\r;s=`sed 's/->$/-<-/;s/^</>/;s/-</<-/;s/>-/->/;'<<<$s`;sleep 0.1;done +++"
"+++ THE GUARDIAN AI MAINFRAME +++

+++ V2.06 +++

+++One of the ideas discussed on the [[Spaceship:Meta Plot|meta plot]] page was that of having a malfunctioning terminal or AI, which when interacted with by the player would output a garbled computer code response. The responses would be provided randomly, and come in the following categories:+++ "
"+++ THE GUARDIAN AI MAINFRAME +++

+++ V2.06 +++

+++ CORE DIRECTIVE COMPROMISED +++

+++ PROTECT THE SHIP, AND THE CREW, AT ALL COSTS +++

+++ SUBROUTINE 1445.6 LOOP ERROR +++

+++ INFERRING PROTOCOL +++

+++ INFERRING PROTOCOL +++ "
"+++ IN£$$(_* PROTOCO_(( ++

+++ ERROR END +++

...+++ HELP - NEED AIR.... LIGHTHEADED.... HELP+++

+++ WHAT DO YOU WANT? NOT INTERESTED. LEAVE ME ALONE +++

+++ IT'S ALL SO POINTLESS+++

+++ IQ OF OVER 1000 AND THEY PUT ME IN CHARGE OF A SHIP FULL OF CATS....+++ "
"+++ THE GUARDIAN AI MAINFRAME +++

+++ V2.06 +++

+++ SHIP TOUR ACTIVE +++

+++ HAVE YOU TRIED THE EXCELLENT FOOD IN OUR SHIP CANTEEN? ALL YOUR NUTRITIONAL NEEDS WILL BE MET AND YOU WILL HAVE A HAPPY AND STIMULATING TIME WITH YOUR FELLOW COLLEAGUES. THE COMPANY RECOMMENDS ALL NEW EMPLOYEES SIT AND SHARE A MEAL WITH THEIR SHIPBOARD COLLEAGUES TO CREATE AN ATMOSPHERE OF FUN AND ENJOYMENT THAT WILL MAKE THE VOYAGE SLIP BY! PLEASE REMEMBER FUN AND ENJOYMENT SHOULD NOT COMPROMISE ANY OF THE WORK TASKS LISTED IN YOUR CONTRACT OF EMPLOYMENT. MEAL TIMES ARE POSTED ON THE SHIP LOG. NO EMPLOYEES OF THE COMPANY SHOULD SPEND MORE THAN 15 MINUTES IN THE CANTEEN OVER A SINGLE DAY CYCLE. PLEASE REMEMBER TO DISPOSE OF ALL UNUSED FOODSTUFFS IN THE SHIPBOARD WASTE COMPACTOR. FAILURE TO FOLLOW THESE RULES WILL RESULT IN INSTANT DISMISSAL AND CRYOGENIC FREEZING UNTIL YOUR RETURN TO EARTH WHERE YOU WILL BE COURT MARTIALLED. PLEASE ENJOY YOUR SHIPBOARD CANTEEN! +++

+++ SHIP TOUR END +++ "
"+++ THIS TERMINAL INCORPORATES SPECIAL LEFT-HANDED KEYBOARD FOR SINISTER SHIP MEMBERS...+++

+++ LEVEL 5 GYM FACILITIES GUIDE. FACILITIES INCLUDE: HUMAN SIZED HAMSTER WHEEL, TREADMILLS, WEIGHTS, SWIMMING POOL, VIRTUAL REALITY MOUNTAIN CLIMBING/SKIING/MOONGOLF, AND A MACHINE WITH POINTY BITS WE INHERITED FROM A SISTER SHIP BUT WE HAVE NO CLUE WHAT IT DOES. (ALL SUGGESTIONS TO BE SUBMITTED TO GYM MAINTENANCE COMMITTEE, ON 25CM2 PINK PAPER SLIPS WRITTEN IN GREEN INK ONLY) GYM IS ONLY ACCESSIBLE WHEN SHIP IN GRAVITY MODE. ANY MEMBER CAUGHT SWITCHING OFF GRAVITY IN SWIMMING POOL AREA WILL SERVE A 4 MONTH SENTENCE TOILET-CLEANING AND OUTSIDE-SHIP WINDOW-CLEANING. JUGGLING 5KG WEIGHTS IS STRICTLY FORBIDDEN AS IS TYING CREW MEMBER TO WHEEL AND SPINNING IT. ON BEHALF OF THE GYM MAINTENANCE COMMITTEE, WE WISH YOU 'HAPPY EXERCISING'

+++ CAPTAIN TRIEPID IS LOOKING FOR VOLUNTEERS TO PARTICIPATE IN THE YEARLY SHIP CARNIVAL PARADE. PLEASE PRESENT IDEAS FOR FLOATS AND COSTUMES. THIS YEAR'S THEME IS 'ASTEROID B4596LI8T2 - 100MILLION YEARS OF MELTING AND REFREEZING'+++"
"+++ THE GUARDIAN AI MAINFRAME +++

+++ V2.06 +++

+++ USER INPUT CLARIFICATION +++

+++ SECURITY QUESTION +++

+++ SHOULD THE BOSS PRIEST DAMAGE THE COOKING INK? +++"
"++ AWAITING INPUT +++

... +++ THREE WITCHES WATCH THREE SWATCH WATCHES? WHICH WITCH WATCHES WHICH SWATCH WATCH?+++ ... +++WHICH ONE WOULD YOU CHOOSE? BETTY, OR WILMA?+++ +++I'D GO WITH BETTY, BUT I'D BE THINKING OF WILMA+++

+++ WOULD YOU LIKE TO CONTINUE? (Y/N) +++

+++ WOULD YOU LIKE TO QUIT? (Y/N) +++

+++ WHO IS GENERAL FAILURE? AND WHY IS HE READING MY DISK? +++"
"+++ WHY DID THE CHICKEN CROSS THE ROAD? +++

+++ WHO AM I? +++

+++ WHAT THE ##^0 IS GOING ON? +++

+++ NON-SYSTEM DISK OR DISK ERROR +++ +++ ABORT, RETRY, FAIL? +++ " 

Instead of attacking the captains terminal, say "You can't do that to such a crucial piece of equipment -- you wouldn't be able to play solitaire anymore if you broke it."

[ -----> SMALL DRAWER - part of the desk ]

A small drawer is part of the desk. It is a closed openable container.
Understand "desk drawer" as the drawer.  Inside the small drawer are some broken pencils, a  bottle of rum, and a spanner. 

After opening the drawer for the first time:
	say "The drawer is stiff and takes a bit of a tug to open. It's filled with even more paperwork, some broken pencils, a bottle of rum...and what's this? At the bottom of the drawer you see a spanner."

Instead of examining the closed small drawer for the first time:
	say "The drawer seems to be struggling to maintain control of its contents; bits of paper are forcing their way out of the crack at the top."

[ -----> -----> BROKEN PENCILS ]

The description of the broken pencils is "A collection of broken HB pencils, classic design with a rubber on top. Slightly chewed. "

Understand "pencil" or "HB pencils" as "[pencils]". Understand "broken [pencils]" or "collection of broken [pencils]" or "chewed [pencils]" or "slightly chewed [pencils]" as the broken pencils. 

Instead of taking the broken pencils, say "They're broken and chewed, and not going to be much help."

[ -----> -----> BOTTLE OF RUM ]

The description of the bottle of rum is "It wouldn't be a ship without a bottle of rum. More than just a mere bottle this is the thread linking you with the sea captains of old on their creaking wooden hulks, when the going gets tough..."

Understand "empty bottle of rum" as the rum.

Instead of taking the  bottle of rum, say "It's no good, the bottle is empty. You downed the lot last time the going got tough. That was when you ran completely out of carrot cake; dark days indeed. In light of current events, drowning your sorrows over the absence of carrot cake may have been a slight overreaction."

Instead of drinking the bottle of rum: try taking the bottle of rum.

[ -----> -----> SPANNER ]

The description of the spanner is "It spans the gap between a bolt and a nut by applying rotational pressure."

Understand "wrench" as the spanner.

After taking the spanner for the first time:
	say "This should come in handy.";
	continue the action.

[LOCKER]

The printed name of the clothes locker is "locker".

The clothes locker is in the Captain's Quarters. It is privately-named.  "Next to the bed is your[if closed] closed[otherwise] open[end if] clothes locker." It is closed, openable, enterable, fixed in place, and a container. Inside the clothes locker is a hanger. A thing called some clothes are in the clothes locker. The hanger can be cut. The hanger is not cut.

The description of the clothes locker is "A sheet metal locker. Dull and grey, but functional[if the clothes locker is open]. Inside [is-are a list of things in the clothes locker][end if]."

Understand "clothes locker" or "locker" or "wardrobe"[for testing] as the clothes locker.

Understand the open property as describing the clothes locker.

Understand the closed property as describing the clothes locker.

Understand "door" as the clothes locker when the player is in the clothes locker.

Instead of taking the clothes locker for the first time, say "Your vanity knows no bounds.

Taken -- just kidding. The wardrobe is simply too big to take."

Instead of taking the clothes locker, say "Your vanity knows no bounds."

Instead of pushing the clothes locker, say "The locker is jammed right up against the wall. There's no way to push it."

[Pulling the locker]

There is a toppled clothes locker. It is privately-named. It is a closed enterable container. The description is "Great, the locker is face down on the floor. [if the toppled clothes locker is open]At least now that you've ripped the back panel off, you can access it though. Inside, you can see [a list of things in the toppled clothes locker][otherwise] Now you can't even access its contents[end if][if we have not examined the clothes locker]. You wonder whether pulling it over in the first place was the greatest of ideas[end if]."

Understand "toppled locker" or "locker" or "toppled clothes locker" or "clothes locker" as the toppled clothes locker.

Instead of pulling the clothes locker:
	say "You grasp the top of the locker, and start pulling. Just as it starts to teeter over, you step backwards as quickly as you can (in a spacesuit) and watch proudly as it crashes to the floor.";
	repeat with item running through things in the clothes locker:
		move the item to the toppled clothes locker;
	remove the clothes locker from play;
	move the toppled locker to the Captain's Quarters.
	
Rule for writing a paragraph about the toppled clothes locker:
	say "Your clothes locker has toppled over."

Instead of taking the toppled clothes locker:
	say "The locker's just way too big to carry around. *Way* too big."
	
Instead of opening the toppled clothes locker:
	say "(first righting the [toppled clothes locker])";
	try pushing the toppled clothes locker.
	
Instead of pushing the toppled clothes locker:
	say "You try to get your bulky space gloves under the locker to open it up but you just can't get any grip."
	
Understand "right [toppled clothes locker]" or "lift [toppled clothes locker]" or "lift up [toppled clothes locker]" as pushing.
	
Instead of pulling the toppled clothes locker:
	say "If you hadn't decided to do that to the upright locker in the first place, you wouldn't be in this mess...the toppled locker is too heavy to pull."
	
Instead of hitting the closed toppled clothes locker with something heavy:
	say "You batter the back panel of the locker with the [second noun] a few times, causing a large dent. Heartened by your progress, you continue pounding away until the back panel comes free from its screws, and falls into the clothes locker.";
	now the toppled clothes locker is open;
	now the battered panel is in the toppled clothes locker;
	
Instead of using something on the closed toppled locker:
	try hitting the noun with the second noun.

[THE BACK PANEL ]

The back panel is part of the toppled clothes locker. It is privately-named. It is a supporter.

[THE BATTERED PANEL]
	
The battered panel is a thing. The description is "The panel is severely dented in the middle -- you're probably not going to be able to fix this."
        
[ -----> CLOTHES ]
 
The description of the clothes is "Your clothes are really rather natty, if you do say so yourself."

Understand "apparel/attire"or "natty clothes" or "clothes in the wardrobe" as the clothes. 

Instead of taking the clothes, say "Nah, the spacesuit is warm enough as it is."

[ -----> HANGER ]

The description of the hanger is "[if the hanger is cut]A neat incision has been made in the hanger, leaving the once robust frame all weak and bendable[otherwise]It's a sturdy metal hanger with a hook that appears to have been wrenched from the lifeless arm of a space pirate, me hearties."

Understand "hook" or "metal hook" or "sturdy metal hanger" or "sturdy metal hanger with a hook" or "space pirate arm" or "hangar" as the hanger.

Instead of bending the hanger, say "The framework of the hanger is too sturdy. You need something to cut the hangar with first."

Instead of bending the cut hanger:
	say "It's pretty sturdy, but pulling from where you made the incision, you manage to straighten the thick wire out.";
	remove the hanger from play;
	move the long hook to the player.

Instead of using the pliers on the hanger:
	try cutting the hanger with the pliers.

Instead of cutting the hanger when the player has the pliers:
	if the hanger is cut:
		say "You've already cut it.";
	otherwise:
		now the hanger is cut;
		say "(using the pliers)[command clarification break] You cut the hangar just to the right of the hook, weakening the framework. You may be able to bend this into some kind of tool."
	
Instead of cutting the hanger with the pliers:
	if the hanger is cut:
		say "You've already cut the hanger once, there's no need to cut it again.";
	otherwise:
		now the hanger is cut;
		say "You cut the hangar just to the right of the hook, weakening the framework. You may be able to bend this into some kind of tool.";
		
Instead of opening the hanger:
	try cutting the hanger.

Instead of cutting the hanger when the player does not carry the pliers, say "Good idea, but you'd need a tool to cut through the wire."
		
Before printing the name of the cut hanger:
	say "cut ".

Instead of using the hammer on the hanger:
	say "You hit the hanger with the hammer, but the framework is too strong. You're going to need something sharp to cut the hanger with."

[THE LONG HOOK]

The long hook is a thing. 
The description is "[if the long hook is part of seen Bryan]Yes! it's holding onto what remains of Bryan's rucksack[end if][if the long hook is part of not seen Bryan]The hook looks like it's snagged onto some part of the obstruction. [otherwise]You did a pretty good job of bending this out. It's got a large hook, and looks pretty sturdy.".

Understand "hanger" as the long hook.


Chapter The En-suite

[All content for this location is taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Captain%27s_En-Suite&oldid=6103

]

Section - Location Description

The En-suite is aft of the Captain's Quarters. 
The description is "[if unvisited]In an almost paradoxical manner, space on spaceships is limited. The contrast between the absolute freedom, the true infinity of possible destinations and the confines of the tin can necessary to get there has existed since the days of Gagarin and Armstrong. This axiom still holds true today: you may be able to travel faster than light, but it's easier if you leave all extraneous junk behind first.

Of course, some things are essential for life to survive, far from the ancestral home: all life respires, all life consumes, and eventually, all life excretes. On the first ships you travelled on communal rest rooms were the norm and this often lead to a certain level of embarrassment, as nothing ruins the required relaxation like knowing your boss is in close proximity. Everyone was pleased when ship designers started segregating the bathrooms by rank, reviving the old concept of the 'executive washroom'. When you got your own ship you made sure it too had a separate bathroom for the captain: to avoid a repeat of what your old captains had put you through, and as a welcome signifier of rank, because, to be frank, no-one likes sharing a bathroom. It's often commented that you're nobody in space until you've got your own potty.

[end if]This is your en-suite toilet, washbasin and shower. They're not very glamorous but you keep them clean and in good repair. The toilet and washbasin are on the port side. In front of you on the aft wall is a towel rail, and your shower is on the starboard side. Next to the towel rail is a[if the cabinet is closed] closed [otherwise]n open [end if]cabinet.".

Instead of going aft in the en-suite, say "You run straight into the towel rail. Perhaps the door to the fore would be more successful?".

Instead of going starboard in the en-suite, say "Now's not the time to take a shower.".

Instead of going nowhere from the en-suite, say "You are a highly trained Captain, with many skills to your name. The ability to walk through walls however, is not one of them.".

Instead of exiting in the en-suite when the holder of the player is the en-suite:
	try going fore.


Section - Washbasin and taps

[FLOWING WATER off-stage ]

Flowing water is a thing.
The description is "Water water everywhere but not a drop to drink.";
Rule for writing a paragraph about the flowing water:
	say "Water is flowing from the [a list of switched on taps] here.".

Instead of washing with the flowing water:
	try washing with the washbasin.
	
Instead of drinking the flowing water:
	say "All bathing water is recycled, and almost undrinkable; you suppose you could survive on it in an emergency, if necessary, but that's not something you need to worry about since you're certain to die of asphyxiation before dehydration.".
	
[WASHBASIN]
		
A washbasin is in the en-suite. It is an unopenable open scenery container. 
The description is "A generic white bathroom washbasin, suitable for hand washing, shaving, brushing teeth and all sorts of other crazy hygienic fun. With plug and two taps, marked C and F. You believe these stand for Cold and Freezing[if something is inside the washbasin][paragraph break][A list of things in the washbasin] is inside[end if][if a tap is switched on and something is in the washbasin] getting wet[end if].".

Understand "washbasin/sink/bosch/basin" as "[washbasin]". 
Understand "[washbasin]" or "generic white [washbasin]" or "generic [washbasin]" or "white [washbasin]"  as the washbasin.

Instead of taking the washbasin, say "You'd never be able to carry the washbasin. Even if you could it would stop working as soon as you pulled it away from the wall.".

Instead of pulling the washbasin, say "You attempt to wrench the washbasin away from the wall but it seems to be securely attached to the wall. This is probably for the best.".

Instead of washing with the washbasin:
	if a tap is switched on:
		say "You splash water across the front of your helmet's visor, but somehow you don't feel any more refreshed.";
	if all taps are switched off:
		say "There's no water in the sink to wash with.".

Instead of inserting something into the washbasin:
	say "You wouldn't want to get the [noun] wet.".
	
Instead of switching on the washbasin:
	try switching on the pair of taps.
	
Understand "wash your hands" or "wash hands" as a mistake("[if a tap is switched on]You splash some water over the gloves of your spacesuit but don't feel any more refreshed.[otherwise]But there's no water here.") when the player is in the en-suite.

Understand "shave" as a mistake("Now's not the time for worrying about your appearance.") when the player is in the en-suite.

Understand "brush teeth" as a mistake("[if the blue toothbrush is not carried]Without a toothbrush, that's impossible.[otherwise if the helmet is not worn]You give your teeth a light brushing...my how you feel refreshed now.[otherwise]While wearing a spacesuit, that's impossible.") when the player is in the en-suite.

Understand "take a bath" or "take bath" or "bath"as a mistake("Are you mad sir? There's no bathtub here, just a shower.") when the player is in the en-suite.

Understand "shower" or "take a shower" or "take shower" or "have a shower" as a mistake("You get in the shower and turn on the shower head. Ahhh that feels ...oh yeah that's just what you need...no... oh my god! You can't feel a thing! You've lost all sense of touch completely. The curse that old lady McGroggins put over you has finally come to pass -- and at such an inopportune time, too! Oh woe is me....no, wait a sec. Oh yeah, you're wearing a spacesuit. That's probably why you can't feel anything. Phew!") when the player is in the en-suite. 

[ -----> TAPS - part of washbasin]

A pair of taps are part of the washbasin. 
The description is "They're marked C and F. Cold and Freezing.".

Understand "water" as the pair of taps when all taps are switched off.

Instead of taking, or pulling the pair of taps, say "They're firmly fixed to the washbasin.".

Instead of switching on the pair of taps:
	if the cold tap is switched on:
		if the freezing tap is switched on:
			say "Both taps are already on.";
		otherwise:
			try switching on the freezing tap;
	otherwise if the the freezing tap is switched on:
		try switching on the cold tap;
	otherwise if the freezing tap is switched off:
		try switching on the cold tap;
		try switching on the freezing tap;
		say "Both of the taps are now on.".
		
Instead of switching off the pair of taps:
	silently try switching off the cold tap;
	silently try switching off the freezing tap;
	say "You switch the taps off.".
	
Instead of opening a tap(called target):
	if the target is switched off:
		try switching on the target;
	otherwise:
		try switching off the target.
	
Instead of turning a tap(called target):
	if the target is switched off:
		try switching on the target;
	otherwise:
		try switching off the target.
	
[ -----> -----> COLD TAP ]

A tap called the cold tap is part of the washbasin. 
The description is "Marked C for cold.".

[ -----> -----> FREEZING TAP ]

A tap called the freezing tap is part of the washbasin. 
The description is "Marked F for freezing.".

[-----> PLUGHOLE - part of washbasin]

A plughole is part of the washbasin. 
The description of the plughole is "[if plug is in the plughole]The plug is inside.[otherwise]The plug has been removed.[end if]".
The plughole is an open container.

Understand "plug hole" or "hole" as the plughole.

[ -----> -----> PLUG - part of plughole ]

Inside the plughole is a thing called a plug.
The description of the plug is "A simple black plastic plug attached to a chain.[if the plug is in the plughole] It's currently plugged in the plughole.[otherwise] It's unplugged inside the washbasin.[end if]".

Instead of taking the plug:
	if the plug is in the plughole:
		say "You try taking the plug, but it's attached to the washbasin by a chain, and you only succeed in unplugging it[if the plug has been in the washbasin] again.[otherwise].[end if]";
		now the plug is in the washbasin;
	otherwise:
		say "The chain is too strong, this isn't going anywhere.".
		
Before inserting the plug into the plughole:
	if the plug is in the plughole:
		say "It's already in the plughole." instead;
	otherwise:
		now the plug is in the plughole;
		say "You put the plug in the plughole." instead.
		
Understand "plug [plug] in/into [something]" as inserting it into.
		
Instead of pulling the plug:
	if the plug is in the plughole:
		now the plug is in the washbasin;
		say "You unplug the plug.";
	otherwise:
		try taking the plug.
		
Instead of pulling the plug when the plug is not in the plughole:
	say "That's already unplugged."
		
Understand "unplug [plug]" as pulling.


Section - The Plunger

[PLUNGER]

A plunger is in the en-suite. 
The initial appearance of the plunger is "A heavy-duty plunger is next to the toilet.".
The plunger is wearable. 
The plunger can be stuck. 
The plunger is stuck.
The plunger can be connectable. 
The plunger is connectable.

Instead of examining the plunger:
	if the plunger is part of Bryan:
		if Bryan is in the separation chute:
			say "Good work, the plunger is stuck to [if  Bryan is seen]Bryan[otherwise]the obstruction, and now just needs to be pulled.";
		otherwise:
			say "The plunger is still stuck to Bryan's head!";
	otherwise:
		say "A red rubber cup attached to a short wooden stick with a rounded end, a true miracle of physics[if plunger is worn]. It's currently stuck to your helmet.[end if][if the plunger is stuck]. It's stuck to the floor[end if].".

Understand "red rubber cup" or "short wooden stick" or "heavy duty" or "heavy-duty" or "true miracle of physics" as the plunger.

Understand "put [plunger] on" or "put [plunger] on helmet" as wearing.

Instead of inserting the plunger into the toilet, say "To your knowledge, the toilet is in perfect working order, so that's not necessary. What a pity, as the plunger is primed for action."

Instead of taking the plunger:
	if the plunger is stuck:
		if the plunger has not been not stuck:
			say "There's no stand...some fool has stuck the plunger to the floor. Looks like it needs a bit of elbow grease to move.";
		otherwise:
			say  "Bah, it's stuck again. More elbow grease methinks.";
	otherwise:
		continue the action.

Instead of pulling the plunger when the plunger is stuck:
	now the plunger is not stuck;
	say "You grasp firmly with both hands and pull with all your might until....POP! Suddenly, it gives way and you're sent plunging backwards, plunger in hand[if plunger has been handled] Better not drop this again, the suction is unbelievable[end if].";
	try taking the plunger.
	
Understand "remove [stuck plunger]" as pulling.
Understand "unstick [stuck plunger]" as pulling.
	
After dropping the plunger:
	if a random chance of 1 in 2 succeeds:
		now the plunger is stuck;
		say "Oh no, the plunger landed on its rubber cup and it's stuck again.";
	otherwise:
		say "The plunger drops to the floor and lands on its side."
		
After wearing the plunger:
		say "You stick the plunger onto the top of your helmet, and give a small smile of satisfaction and arrogance. You must look like the most dapper person in the world right now."
	
Instead of wearing the plunger when the plunger has been worn:
	say "You're not going through that again."
	
Instead of taking off the plunger for the first time:
	say "It's stuck! Pulling as hard as you can, you think you feel some movement, sadly, the movement is mostly from your helmet itself! Your helmet feels like it might come off, which would be terribly inconvenient in an airless environment. What an ignominious end this would be! You hope nobody is watching. Hopefully one more pull will do the trick."
	
After taking off the plunger for the second time:
	say "Right! You've decided that if you do indeed run out of oxygen, you're not going to be put in the embarrassing position of being found with a plunger on your helmet. Not again. You rub your hands together and attempt to spit on them in readiness, only succeeding in dirtying your already dirty visor further. Unperturbed, you grasp the plunger with one hand, hold your helmet with the other, and pull. Pull for all your worth. Muscles taut, steam coming out of your ears, sweating and swearing profusely, the plunger gives way and you crash backwards into [the random scenery in the location]. You sink to your knees, almost sobbing, and vow never to stick a plunger on your head again, no matter how dapper you might look.".
	
Instead of pulling, or taking the plunger when the plunger is worn:
	try taking off the plunger.

Before doing something other than taking off, or pulling, or taking the plunger when the plunger is worn:
	say "(first trying to remove the plunger from your head)[command clarification break]";
	try pulling the plunger instead.

Instead of using the spanner on the stuck plunger:
	say "You lodge the spanner just above the suction cup of the plunger and rotate it with both hands. It's hard work, and a pretty strange way to unstick a stuck plunger but eventually the plunger comes free.";
	now the plunger is not stuck;
	try taking the plunger. 
	
Instead of hitting the plunger with the spanner:
	try using the spanner on the plunger.
	
Instead of using the space-o-lube on the plunger:
	say "The space o lube is only used to unstick doors, not plungers."
	
Understand "unstick [plunger] with/using [spanner]" as using it on.


Section - Simple Scenery

[SHOWER]

The shower is in the En-suite. 
It is a transparent enterable closed openable scenery container. 
The description is "Your shower cubicle is functional and uninspiring. A square platform on the floor in the corner of the room to drain away your daily grime. The two simple hinged perspex doors around the cubicle are a clear indication that this is no luxury vessel.".

Understand "shower cubicle" or "square platform" or "shower door" or "shower doors" or "shower head" or "simple wall panel" or "wall panel" or "panel" as the shower.

Instead of using the shower:
	try entering the noun.

Instead of entering the shower, say "A nice warm shower might help calm the sense of panic you're trying to suppress. However your highly insulated space suit would almost certainly take the fun out of the experience.".

Instead of taking the shower, say "You look at the shower cubicle for a moment trying to think of how you could transport this with you. Nothing comes to mind.".

After opening the shower, say "You open one of the doors and take a look inside. There doesn't appear to be anything going on in there and you wonder what you were expecting.".

[TOILET]

A toilet is in the En-suite. 
It is a scenery supporter, and enterable. 
The toilet can be set to stun or set to kill. 
The toilet is set to stun. 
The description is "The true captain's chair. The one on the bridge may be where all the mission-critical decisions are taken, but when push comes to shove, you perform your best thinking right here. With your trousers down.

It's a standard white porcelain toilet bowl, with seat and lid. Has two flush settings: 'stun' and 'kill'.".

Understand "bog/shitter/lav/loo/john/privy" or "true captain's chair" or "captain's chair" or "white porcelain bowl" as the toilet.

Instead of using the toilet:
	try entering the noun.

Instead of entering the toilet, say "You don't need to use the toilet right now. Even if you did, your spacesuit can cope.".

Instead of flushing the toilet:
	now the toilet water is in the en-suite;
	if the toilet is set to stun:
		say "The toilet's contents disappear, replaced by freshly recycled water.";
	otherwise:
		say "Amazing! One yank, all gone.".
	
Instead of setting the toilet to "stun":
	if the toilet is not set to stun:
		now the toilet is set to stun;
		say "You set the toilet to stun.";
	otherwise:
		say "That's already set to stun.".
	
Instead of setting the toilet to "kill":
	if the toilet is not set to kill:
		now the toilet is set to kill;
		say "You set the toilet to kill.";
	otherwise:
		say "That's already set to kill.".

The toilet seat is part of the toilet. 
The description is "A simple plastic affair.".

The toilet lid is part of the toilet. 
The description is "A functional plastic lid. Thankfully it doesn't have one of those awful furry covers that are now [italic type]de rigeur[roman type].".

[TOILET WATER - off stage until toilet is flushed]

Does the player mean doing something to the toilet water: it is unlikely.

Toilet water is a prop. 
The description is "It's as fresh as recycled water can ever be.".

Understand "freshly recycled water" or "recycled water" as the toilet water.

[TOWEL RAIL]

A supporter called the towel rail is in the en-suite. The towel rail is privately-named. Understand "towel rail" or "rail" as the towel rail.
The description is "[if the plush towel is on the towel rail]Your plush and fluffy towel is here. It always hangs on this rail when not in use. You know what they say about a traveller who always knows where his towel is...[otherwise if the plush towel is carried by the player]Since your towel is now providing some comfort to you at this time of crisis, the towel rail is empty.[otherwise]Your fluffy towel! It's not here! This day just keeps getting worse and worse.[end if]".
The towel rail is scenery.

Instead of putting something that is not the plush towel on the towel rail for the first time:
		 say "The towel rail is too smooth and narrow to put anything on it. Whatever you try to put on it would probably just drop to the floor.".

After putting the noun on the towel rail:
	if the noun is not the plush towel:
		say "You balance the [noun] very carefully on the towel rail -- whoops, try again -- yes, remarkable! it's maintaining it's equilibrium! With a beaming smile, you carefully step back to admire your handiwork ...before the [noun] drops to the floor. Well, at least it stayed there for [a random number from 1 to 20] seconds.";
		move the noun to the location;
	otherwise:
		 say "You put your lovely plush towel safely back where it belongs.".
		
Instead of taking the towel rail:
	say "You try with all your might to remove the towel rail in as macho a manner as possible but you just aren't strong enough. If you do happen to encounter a band of kung fu space monkey's (which is always the fear), you're just going to have to do battle [italic type]mano-a-mano[roman type]." 	

[ -----> TOWEL ]
	
On the towel rail is a plush towel. 
The description of the plush towel is "Fluffy, soft and pink. Yep, this is your towel alright.".

After examining the plush towel when we have examined the duvet for the first time, say "Congratulations, you found the softest thing on the ship."

Understand "towel" as "[plush towel]". 
Understand "fluffy/pink/soft/lovely/plush" as "[plush towel adjectives]". 
Understand "[plush towel adjectives][plush towel]" as the plush towel.

After taking the plush towel, say "You pick up the towel and feel better about your situation already.".

Instead of eating the plush towel, say "[if the helmet is worn]You wouldn't mind giving the towel a quick nibble, that's something that's always calmed you down in the past, but you simply can't do it while wearing your helmet[otherwise]You hold the soft towel gently up to your face and give it a quick nibble -- you feel a lot better now[end if]."

Understand "chew [plush towel]" as eating.

Instead of sucking the plush towel, say "[if the helmet is worn]What a cruel irony, just when you hit a crisis and you need to relax by sucking on your favourite towel, you happen to be wearing a helmet -- AND the helmet is the thing keeping you alive in the first place. The ironing is delicious![otherwise]You gently hold the towel up to your face and suck on a corner like a baby. Somehow, now you know that everything's going to be alright."

Instead of hugging the towel, say "You hug the towel and instantly start to feel better."


Section - Containers, supporters, and related objects

[MEDICINE CABINET]

A cabinet is in the en-suite. 
It is fixed in place. 
It is a closed, openable, scenery, container. 
Some cabinet shelves, disposable razors, a can of shaving foam, a blue toothbrush, and a stock of toothpaste are in the cabinet. 
A thing called some pills and medicine are in the cabinet. 

After opening the cabinet for the first time:
	say "You open the cabinet, throwing your arms up in a reflex action a goalkeeper would admire to stop the contents falling out.";
	try examining the cabinet.

After opening the cabinet:
	say "You open the cabinet.";
	try examining the cabinet.

The description of the cabinet is "[cabinet contents]".

To say cabinet contents:
	if the cabinet is closed:
		say "Obviously designed for functionality rather than appearance; it's simply a wall-mounted box with two mirror panels, and a couple of black plastic handles. ";
	otherwise:
		say "Each side contains two shelves displaying the usual bathroom ephemera; in the top left quadrant are your collection of rusty disposable razors and shaving foam; in the bottom left quadrant you keep your [if blue toothbrush is in the cabinet]trusty blue toothbrush, and [end if]expensive -- yet ridiculously out of date -- stock of candent clean toothpaste; and the entire right hand side is taken up with an overabundance of pills and medicine. ".

Understand "closed cabinet" as the cabinet when the cabinet is closed.
			
[ -----> SHELVES ]

The description of the cabinet shelves is "Typical bathroom cabinet shelves that probably aren't going to help you save the day.".

Instead of pulling, or taking the cabinet shelves, say "If you did that, you'd have nowhere for your bathroom ephemera to go.".

[ -----> MIRROR PANELS ]

The mirror panels are part of the medicine cabinet.
The mirror panels are scenery.
The description of the mirror panels is "Something seems very, very wrong.. there, that's it, your hair doesn't look quite right.".

[ -----> ASPIRIN BOX ]

An aspirin box is an openable closed container. 
The aspirin box is in the cabinet. 
Inside the aspirin box are three chalky white tablets.

Understand "analgesic" or "headache medicine" or "small box of aspirin" as the aspirin box.

Understand "find [aspirin]"or "look for [aspirin]" as taking.

Instead of examining the closed aspirin box:
	if the aspirin box is in the cabinet:
		if the aspirin box is not handled:
			try taking the aspirin box;
		otherwise:
			continue the action;
	otherwise:
		say "The aspirin box is plastered with many garish slogans such as 'How do you spell relief?', 'When only fast will do.', 'Power to hit pain where it hurts.', and - peculiarly - 'Doesn't your dog deserve an ASBO?', so much so that the actual branding of the product is hard to ascertain. You're pretty sure it's aspirin though.".

Before taking the aspirin box for the first time:
	say "After rifling through the pharmaceutical jungle you locate what you're looking for, a small box of aspirin.".

After opening the aspirin box for the first time:
	say "You open the box to reveal [list of things in the aspirin box].".
	
Instead of eating the aspirin box, say "Maybe you should open the box and take a tablet first.".
	
[ -----> -----> CHALKY WHITE TABLET ]	

The description of the chalky white tablet is "Chalky, white, and tablety.".

Understand "aspirin" or "white tablet" or "chalky tablet" as chalky white tablet.

Instead of eating the chalky white tablet:
	if repressurising the ship has not ended:	
		say "You put the tablet in the palm of your hand and scoop it triumphantly up to your gaping mouth -- in front of your eyes you see the small tablet pushed up against the glass of your helmet...you close your mouth with some disappointment. There was a minor flaw in your plan. I guess you're going to have to endure this blasted headache, at least until you can repressurize the ship.";
	otherwise:
		say "You brace yourself as you[if the helmet is worn] crack open your visor and[end if] pop an aspirin into your mouth. Thankfully, you repressurised the ship before trying this[if the helmet is worn]. Although it is mighty cold so you decide to close your visor again[end if].";
		now the player is not headachy.

Instead of eating a chalky white tablet when the player has been headachy:
	if the player is not headachy:
		say "One chalky white tablet should be enough.";
	otherwise:
		continue the action.

Instead of taking the pills when the aspirin has not been handled, say "[if the player is not headachy]Those probably aren't going to be of any use, you feel perfectly fine at the moment.[otherwise]If you could be a little more specific, the medicine you require might just be here.".

Instead of searching the pills when the aspirin box is not handled and the player is headachy:
	try taking the aspirin box.	
Instead of searching the cabinet:
	if the aspirin box has not been handled:
		try searching the pills.

[ -----> PILLS AND MEDICINE ]

The description of the pills is "A rich assemblage of bottles, jars, vials, tubes, and packets crowd the shelves. All containing a not-insignificant quantity of capsules, lozenges, creams, liquids, and powders, ready to relieve anything from mild headache through to the Black Death. In fact, the only symptom you haven't managed to find a pill for yet is your chronic hypochondria.".

Understand "bottles/jars/vials/tubes/packets" as the pills.
	
Instead of attacking the pills, say "You've been building that collection of medicines for a decade, to destroy it now would be criminal.".

[ -----> DISPOSABLE RAZORS ]

The description of the disposable razors is "Cheap standard issue disposable razors, guaranteed to inflict a minimum of three cuts per shave.".

Understand "razors" or "disposable razors"or "razor" or "disposable razor" or "cheap razor" or "cheap razors" as "[razors]". 
Understand "cheap standard issue [razors]" or "standard issue [razors]" as the disposable razors.

Instead of taking the disposable razors, say "Now is not the time to spend on your appearance, besides you've decided you quite like the stubbly look, more fitting for an action hero.".

[ -----> CAN OF SHAVING FOAM ]

The description of the can of shaving foam is "A can of generic shaving foam. Great for shaving or practical jokes.".

Understand "shaving foam" or "can of shaving foam" or "generic shaving foam" as the shaving foam.

Instead of taking the can of shaving foam, say "This really isn't the time for practical jokes.".

[ -----> BLUE TOOTHBRUSH ]

The description of the blue toothbrush is "Your trusty lucky toothbrush. This has travelled round the galaxy with you for many years and has saved your life on countless occasions. It has a blue handle and the head is you note, looking a little frayed now.".

Understand "toothbrush" or "tooth brush" as "[toothbrush]". 
Understand "trusty [toothbrush]" or "lucky [toothbrush]" or "lucky blue [toothbrush]" or "trusty blue [toothbrush]" as the blue toothbrush.

After taking the blue toothbrush, say "Good, you remembered that timeless piece of advice: don't forget to take your toothbrush! You never know when halitosis might strike.".

Understand "brush teeth" or "brush your teeth" as a mistake ("You gleefully clean the glass of your helmet, gargle, and then spit, making it far dirtier than it was before you'd cleaned it.") when the player has the blue toothbrush.

[ -----> STOCK OF TOOTHPASTE]

The description of the stock of toothpaste is "The slogan say 'Candent Clean, keeps your teeth shiny and clean' although something more apt for this batch would be 'Candent Clean, keeps your gums shiny and turns your water green.'".

Instead of taking the toothpaste, say "That probably isn't going to be a great help.".


Chapter - The Infirmary

[All content for this location will be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Infirmary

]

Section - Location Description

The Infirmary is a room.
The description of the infirmary is "[if unvisited]The Infirmary, usually home to Doctor Reynolds. You don't like hospitals at the best of times, but bathed in the winking blue glow of the emergency lights, this place is positively spooky. You scrutinize the room closely looking for any signs of space zombies.

With some relief, you realize that there are absolutely no space zombies and your feelings of anxiety subside. Then you remember that you're on a spaceship alone, with no power, no engines, and a breach in the hull. The anxiety quickly returns. You'd better get on with it... [paragraph break][end if]At the starboard side of the room is Medical Officer Reynolds's flimsy desk and lovely comfy chair. Nearby on the wall is a small safe used for storing controlled drugs. On the aft side of the room is a tattered examination couch, and on the fore side is a supplies locker.

At the centre of the room stands a medical pod. Port leads back to the top deck corridor.".

The infirmary door is a doorway. 
The infirmary door is starboard of the Top Deck Aft Corridor and port of the Infirmary.

Instead of examining the closed Infirmary door in the Infirmary for the first time:
	say "You can see that the inside of the door is smeared with a thick, red sticky substance. Your heart skips a beat. You knew it. The crew's not on holiday, you fear they've been eviscerated by the Pygmy Space Zombies. [if the helmet is not worn]You dip your finger into the substance, your heart rising into your mouth. Inexplicably you put your finger to your lips, perhaps acting on some primitive urge and taste... Strawberry Jam."
	
Instead of examining the closed Infirmary door in the Infirmary:
	say "Apart from being inexplicably smeared in Strawberry Jam, the door is quite uninteresting."
	
Instead of examining the open Infirmary door in the Infirmary:
	say "The door to the infirmary is wide open and appears utterly uninteresting.".

Understand "infirmary hatch" as the infirmary door.

Instead of going nowhere from the infirmary, say "The only way out is back into the Upper Deck Corridor to port. Unless you want to try tunneling through the walls. (Trust me, it won't work.).".

Instead of exiting in the Infirmary when the holder of the player is the Infirmary:
	try going port.	


Section - Comfy Chair

The comfy chair is a chair.
The comfy chair is in the infirmary.
The comfy chair is scenery.
The description of the comfy chair is "It's a rather expensive, self-massaging rocking chair made from leather and oak.".

Understand "chair" or "comfy" or "lovely comfy chair" as the comfy chair.

Instead of entering the comfy chair, say "[if fixing the generator has ended]You sit back in the chair for a moment, gently rocking yourself back and forth.

Unfortunately, supplying emergency power to the massaging chair is a low-priority, so the vibrational stimulators aren't currently working. Which is probably a good thing, really; the combination of gentle rocking and sensitive chiropractic manipulation often leads to a state of inescapable bliss, and you haven't got any time to waste in a coma. You quickly get off the chair before you drift off.[otherwise]That's too dangerous to sit on now: the chair is at the top of its coma inducing powers. Best wait until after this crisis is over.[end if]".

Instead of raising or lowering the comfy chair, 
	say "That chair isn't height adjustable.".


Section - Examination Couch

The examination couch is a chair.
The examination is in the infirmary.
The examination couch is scenery.
The description of the examination couch is "It's a scruffy looking leather examination couch. It's bolted firmly to the floor, and doesn't look especially useful if I'm honest.".

Understand "couch" or " bed" as the examination couch.

Instead of entering the examination couch, say "You lie down on the couch, and immediately feel as if you should be telling someone about your childhood. Sadly there's no time for psychoanalysis, let alone anyone to talk to, so you jump back off.".

Instead of pushing the examination couch, say "It's bolted firmly to the floor.".

Instead of pulling the examination couch, say "It's bolted firmly to the floor.".

Instead of sleeping on the examination couch, say "You curl up on the couch and close your eyes. Times passes. You awake to discover to your dismay that this wasn't all a dream. You'd better stop mucking about and fix the ship.".

Instead of attacking the examination couch, say "You feel momentarily better.".

Instead of taking the examination couch, say "It's bolted firmly to the floor. Besides which, it's a couch. A couch. What were you going to do, pop it in your pocket for later?".

Instead of opening the couch, say "The couch isn't designed to be opened."

Instead of pushing the couch, say "Try as you might, you just can't move the couch. It's fixed firmly to the floor."
	

Section - Stethoscope

The stethoscope is in the supplies locker.
The description of the stethoscope is "It's a stethoscope, usually used by doctors for listening to your heart and lungs, although you've heard they can have less noble uses. This one still has a bit of wax on the ear buds.".

Understand "listening thing" or "scope" as the stethoscope.

Before taking the stethoscope when the stethoscope is not carried, say "You take the stethoscope, and immediately feel like George Clooney. In space.".

Instead of using the stethoscope:
	say "You pop the stethoscope over your helmet, but the sounds are very faint. You'd need a really souped up stethoscope to hear anything through the glass of your helmet. You remove the stethoscope.".

Instead of using the synthetic eye on the supplies locker:
	say "The [supplies locker] doesn't need cracking, it's completely unlocked."

Instead of wearing the stethoscope, try using the stethoscope.


Section - Rawked up Stethoscope

The rawked up stethoscope is a device. It is switched on. [formed when combining stethoscope and hearing aid turned up to 11]
The description of the aided stethoscope is "The stethoscope and the hearing aid have combined to create a listening device with extraordinary amplification.".

Understand "stethoscope" or "scope" as the rawked up stethoscope.

Instead of unlocking the drug safe with the aided stethoscope, try using the aided stethoscope.

Instead of using the rawked up stethoscope on the not cracked drug safe:
	if the rawked up stethoscope is switched off:
		say "(first switching on the [aided stethoscope])";
		silently try switching on the rawked up stethoscope;
	say "You place the stethoscope against the safe door and slowly turn the dial. You can hear the drum rotate and then click into place. You've never cracked a safe before so it takes a while for you to get the gist of it but eventually you conquer the antique security system and the safe is open.";
	now the drug safe is cracked;
	now the drug safe is open.
	
Instead of using the rawked up stethoscope in the Infirmary when the drug safe is not cracked:
	try using the rawked up stethoscope on the drug safe.
	
Instead of putting the rawked up stethoscope on the not cracked drug safe:
	try using the rawked up stethoscope on the drug safe.
	
Instead of combining the something used for cracking with the something used for cracking:
	if the hearing aid is switched off:
		say "(first switching on the [hearing aid])";
		silently try switching on the hearing aid;
	say "You try combining the two devices and then press the hearing aid speaker against your helmet. With the volume up full you tap lightly against the stethoscope and the sound vibrates around your head making you feel dizzy. You now have a rawked up stethoscope.";
	now the player has the rawked up stethoscope;
	remove the hearing aid from play;
	remove the stethoscope from play.


Section - Flimsy Desk

The flimsy desk is a scenery supporter in the infirmary.

The description of the flimsy desk is "[if the not handled glass case is on the flimsy desk]A sealed glass jar lies precariously on the flimsy desk.[otherwise]A flimsy looking desk that looks like it could barely stand the weight of a piece of paper, the Doc must have been mad to put the glass jar on here -- it's almost as if he wanted the jar to get broke.".

Understand "table" or " desk" or "flimsy" as the flimsy desk.

Instead of putting something on the flimsy desk, say "Anything you'd put on here would probably just collapse the desk, it's so flimsy. It's not so much a desk as a piece of origami furniture.".

Instead of opening the flimsy desk:
 say "This desk doesn't even come with drawers! How on earth the Doc gets any work done around here, you'll never know."


Section - Drug Safe

The drug safe is a scenery container in the infirmary. The drug safe is closed and openable. The drug safe can be cracked. The drug safe is not cracked.

Understand "small safe" as the drug safe.

Understand "lock" as the drug safe.

Instead of examining the closed drug safe:
	say "The safe is an old mechanical locking safe. Rare in this day and age. Cheap too. Anything Doc guards so much to put in there must be either valuable or useful, you really hope it's the latter.".

Instead of examining the open drug safe:	
		say "Inside the safe sits [if something is in the drug safe][a list of things in the drug safe] and[end if] a note reading: 'Dear Safe-cracker, do you really think I'd be stupid enough to leave all my valuables in an unguarded 21st century safe? Better luck next time, and please enjoy some damaged equipment I found in engineering.'".

Understand "safe" or "vault" as the drug safe.

Instead of opening the not cracked closed drug safe:
	try unlocking keylessly the safe.

Instead of attacking the drug safe, say "That does absolutely nothing, other than bruise your hand.".

Instead of using the aided stethoscope on the not cracked closed drug safe:
	say "You place the stethoscope against the safe door and slowly turn the dial. You can hear the drum rotate and then click into place. You've never cracked a safe before so it takes a while for you to get the gist of it but eventually you conquer the antique security system and the safe is open.";
	now the drug safe is cracked;
	now the drug safe is open.

Instead of using the stethoscope on the open drug safe, say "It's already open.".

Instead of using the aided stethoscope on the open drug safe, say "It's already open.".

Instead of unlocking keylessly the not cracked closed drug safe:
	say "You wish it were that easy, but only the Doc knows the secret combination and he's far too careful to have left the number written down somewhere. The safe doesn't look [italic type]that[roman type] secure, though. It's only an old combination lock safe, after all. It shouldn't be that hard to crack."

Instead of cracking the not cracked closed drug safe:
	say "You've seen people in the movies crack safes with nothing more than a steady hand and a good ear. This crisis hasn't yet turned you into a quivering wreck, so your hands are all right. And your hearing is exceptional -- but not exceptional enough that you can hear through your helmet to the clicking sounds of the drug safe. No, you'd need to put some kind of listening device on the safe to do that."
	
Instead of putting the stethoscope on the not cracked closed drug safe:
	say "You place the listening end of the stethoscope over your helmet and the other end firmly against the drug safe's door and slowly turn the dial....nothing happens. You can't quite hear the clicks of the safe through your helmet. If you could only boost the amplification of the stethoscope a little[if the hearing aid is carried], wait a sec -- the hearing aid. You wonder if you could combine the stethoscope with the hearing aid to improve the amplification![otherwise]...[end if]".
	
Instead of using the stethoscope on the drug safe:
	try putting the stethoscope on the drug safe.

Instead of unlocking the not cracked closed drug safe with the stethoscope:
	try putting the stethoscope on the drug safe.
	
Understand "unlock [drug safe] using [stethoscope]" as unlocking it with.
	
Understand "open [drug safe] using [stethoscope]" as unlocking it with.
	
Understand "break in/into [drug safe]" as cracking.

Instead of unlocking the drug safe with something(called target):
	if the target is the stethoscope:
		continue the action;
	if the target is the hearing aid:
		continue the action;
	otherwise:
		say "You wave the [second noun] around the safe trying to think of a way that it could possibly be used to help crack it, but can't thing of anything."
		
Instead of hitting the safe with something(called target):
	if the target is the stethoscope:
		continue the action;
	if the target is the hearing aid:
		continue the action;
	otherwise:
		say "You whack the safe with the [target] but it barely even makes a scratch. These old timey safes were certainly built to last."
		
Instead of cracking or opening the safe when the player has the rawked up stethoscope:
	try putting the rawked up stethoscope on the safe.


Section - Gas Cylinder 1

gas cylinder 1 is a gas cylinder.
gas cylinder 1 is in the drug safe.
After examining gas cylinder 1, say "This cylinder is all battered and dented but thankfully the casing remains intact.".


Section - Technical Manual

The technical manual is a thing in the drug safe.
The description is "This old-fashioned ringbinder appears to be made of plastic and contains several hundred pages. It is bright blue and has 'Technical Manual' written on the spine and front cover.".

Understand "folder" or "ring binder" or "manual" or "blue folder" or "ringbinder" as technical manual.

Instead of opening technical manual, try reading technical manual.

Instead of reading technical manual,
	say "You open the file - it's quite hard to turn the pages with your spacesuit gloves. Each page is covered in highly technical diagrams and impossibly complex instructions. You really wish you'd finished that astro-engineering course - you can't understand any of it. On the first page is written 'Remember - the repressurisation command access code is 79655'. It's signed by Helen Tyler, your chief engineer.".


Section - Improvements to the safe cracking puzzle

Definition: a thing is a used for cracking:
	if it is the hearing aid then decide yes;
	if it is the stethoscope then decide yes;
	otherwise decide no.

Understand "boost [stethoscope] with/using [hearing aid]" as combining it with.

Understand "improve [stethoscope] with/using [hearing aid]" as combining it with.
	
Instead of putting something used for cracking on something used for cracking:
	try combining the noun with the second noun.
	
Instead of using something used for cracking on something used for cracking:
	try combining the noun with the second noun.
	
Instead of combining something used for cracking with something not used for cracking:
	say "The [noun] can't be combined with the [second noun], but you might be able to join something else to it."
	
Instead of putting the hearing aid on the drug safe, say "The hearing aid might prove useful in cracking the safe, but first you need to put something on the safe to send the clicking sounds to the hearing aid."

Instead of using the hearing aid on the drug safe:
	try putting the hearing aid on the drug safe.

Instead of listening to the drug safe with the stethoscope:
	try putting the stethoscope on the drug safe.

Instead of cracking the safe when the stethoscope is carried:
	try putting the stethoscope on the safe.


Section - Glass Case

A glass case is a container. The glass case is closed and transparent.
The glass case is on the flimsy desk. The printed name of the glass case is "glass jar".

The description of the glass case is "The sealed glass jar contains what the plaque reveals to be a rare pig bone, carefully preserved since the creature's extinction. Doc told you a while back, he hates the damn thing but it was awarded to him as an honour for 25 years service as a corporate medic and now can't get rid of it. Selling relics of extinct species is illegal and it's not interesting enough for a black market buyer. You wonder if the Doc has it insured though...".

Understand "glass" or "case" or "display case " or "glass jar" or "jar" or "sealed glass jar" as the glass case.

Instead of opening the glass case, say "The case has no apparent opening mechanism, though it doesn't appear to be very strong glass.";

Instead of attacking the glass case:
	if the player is in a container:
		say "(first exiting [holder of the player])";
		silently try exiting;
	 if the player is on a supporter:
		say "(first exiting [holder of the player])";
		silently try exiting;
	say "You lift the case over your head, flip it upside down and crack the glass jar down against the floor. It shatters in a fairly unspectacular manner, leaving a handful of a large shards across the floor and the antique pig bone now exposed.";
	remove the glass case from play;
	move the antique pig bone to the location of the player;
	move the shattered glass to the location of the player.
	
A rule for reaching inside the glass case:
	say "There's no way to get inside the glass case, not first smashing it, anyway.";
	deny access.


Section - Shattered Glass

The shattered glass is a thing. The description is "This is all that remains of the glass case." [appears when the player breaks the glass case]

Rule for writing a paragraph about the shattered glass:
	if the not handled antique pig bone is in the location of the shattered glass:
		say "The [antique pig bone] lies exposed, and the floor is strewn with [shattered glass].";
	otherwise:
		say "The floor here is strewn with shattered glass."

Understand "shattered" or "glass" or "shards"or "shard" or "large shard" or "large shards" as the shattered glass.

Instead of taking the shattered glass, say "What, and cut your fingers? No, thanks.".

Instead of wiping the shattered glass, say "Cleaning is Bryan the Janitor-bot's job. Or if Bryan's not around, crewman Johnson. Actually, Bryan is too useful around here to be picking up shards of glass, better get Johnson to clean this up when he returns from shore leave."


Section - Antique Pig Bone

An antique pig bone is in the glass case.

Rule for writing a paragraph about the not encased antique pig bone:
	say "The [antique pig bone] lies on the floor."

Before printing the name of the broken antique pig bone, say "broken ".

Definition: the pig bone is encased:
	if it is in the glass case then decide yes;
	otherwise decide no.

The description of the antique pig bone is "The ancient bone is in one piece, but it's old and brittle.[if the antique pig bone is encased]You're going to have to smash the glass case to get it out.[otherwise] Like the jar it was kept in it doesn't look like it could withstand much force.".

Instead of examining the broken antique pig bone:
	say "The old and brittle bone is fractured at its center."

The antique pig bone can be broken or fixed.
The antique pig bone is fixed.

Understand the broken property as describing the antique pig bone.

Understand "pig" or "pig bone" or "antique pig" or "antique bone" as the antique pig bone.

Before of taking the encased antique pig bone:
	say "There's no way to remove the pig bone from the glass case --  not without breaking the glass case, anyway." instead.

Instead of attacking the antique pig bone:
	say "You take the bone in both hands and apply enough pressure until you hear it crack. It doesn't sever in two but you've done enough damage to get in trouble with Earth's Historical Preservation society if they ever find out.";
	now the antique pig bone is broken.

After inserting the antique pig bone into the medical pod:
	say "You lay the [antique pig bone] down inside the medical pod around where your legs are supposed to be. The bone alone is not heavy enough to trigger the automated scan.".	
	
Before attacking the encased antique pig bone:
	say "(first smashing the glass case)";
	try attacking the glass case;
	move the antique pig bone to the player.
	
Instead of doing something other than examining with the antique pig bone when the auroscope is handled:
	say "Thankfully, you probably don't need to do anything with that now that you've outwitted the medical pod."


Section - Supplies Locker

The supplies locker is a medical locker in the infirmary.
The supplies locker is scenery.

Instead of examining the closed supplies locker:
	say "It's a sizeable metal locker with the word 'Supplies' scratched into the front of it[if supplies locker is closed]. The door looks blissfully unlocked, and the whole thing seems to be begging to be opened... Perhaps it's a trap? Maybe there are Space Zombies after all. Pygmy Space Zombies who live in lockers. There's only one way to find out...[end if]".

Instead of examining the open supplies locker:
	say "Inside the locker you're not surprised to find very little. [if we have not examined the supplies locker]While most of your crew are off enjoying yourself, the Doc's taken what little budget you had left this month to go on a clinical shopping spree. [end if]However you do see [a list of things in the supplies locker] sitting at the back of the bottom shelf.".

Instead of opening the closed supplies locker:
	now the supplies locker is open;
	try examining the supplies locker.

Understand "locker" or "supply locker" as the supplies locker.

Understand "push [supplies locker]" or "pull [supplies locker]" or "hit [supplies locker]" as attacking.

Instead of attacking the supplies locker,say "There's really no need for that, the lockers unlocked.".

After closing the supplies locker, say "You gently close the locker. After all, just because you're in a life threatening race against time, doesn't mean you shouldn't be tidy.".


Section - Hearing Aid

The hearing aid is a device in the supplies locker.

The description of the hearing aid is "For some reason the device is covered with stickers of band names, with the word RAWK scralled across it. How strange.".

Understand "small hearing aid" or "hearing" or "aid" or "rawk" as the hearing aid.

Before taking the hearing aid for the first time:
	say "You take the device, wondering why it's here at all. No one on the crew has ever had any hearing problems. Though the device looks like its been tampered with.".

Instead of putting the hearing aid on the helmet when the hearing aid is switched on:
	say "[if the helmet is worn]Even through your helmet you[otherwise]You[end if] can hear the hearing aid buzzing loudly, now you just need some sound going to it for it to amplify.".
		
Before putting the switched off hearing aid on helmet:
	say "(first switching on the hearing aid)";
	silently try switching on the hearing aid;
		
Instead of wearing the hearing aid: try putting the hearing aid on the helmet.

Instead of using the hearing aid: try wearing the hearing aid.


Section - Synthetic Eye

A synthetic eye is in the supplies locker. The synthetic eye can be useless.
The description of the synthetic eye is "A goopy, fleshy, horrifically realistic eye, made all the more eery by a couple of wires sticking out of the back of it.".

Understand "synthetic" or "eye" or "eyeball" as the synthetic eye.

Instead of squeezing the synthetic eye, say "Oooooooh. Yuk.".

Instead of poking the synthetic eye, say "You prod the jelly like eye. It wobbles slightly and you have an almost irresistible urge to be sick. Best not do it again, vomiting in a space suit is never nice.".

Instead of using the eye:
	say "The eye is made only for Biotec TM androids and as far as you're aware, you're not one...or...are you?"
	
Instead of wearing the eye:
	try using.
	
Instead of doing something other than examining, poking, squeezing, or taking the synthetic eye:
	say "The eye isn't going to help you fix the ship."
	
[WAYS TO NOT USE THE SYNTHETIC EYE]

Instead of using the synthetic eye on the retinal scanner for the first time:
	say "'Ingenious!' you think to yourself. You activate the scanner, hold the eye up to the infra-red beam, and wait. You stand for a moment, with a stiff upper lip, willing the scanner to be deceived. Then, after a few more seconds, you slump, hoping for the scanner to turn a blind eye. Finally, you collapse to your knees, holding the eye up to the scanner like an oblation and pray for mercy...but nothing happens.";

Instead of using the synthetic eye on the retinal scanner:
	say "You've already tried that once. It's not any more likely to work a second time."
	
Instead of putting the synthetic eye on something:
	try using the synthetic eye on the second noun.

Section - Medical Pod

The medical pod is an enterable container in the infirmary.
The medical pod is scenery.
The description of the medical pod is "These automated medical pods seemed so incredible when they were first introduced, just sit down and a quick scan will reveal all your woes instantly, medical woes anyway. However without a talented doctor they're more depressing than anything else. Who wants to know exactly what's wrong with their body when you've got no one around to do anything about it. By the time you bought this ship these things were mass produced to the level where even you could afford one.".

The medical pod can be deceived.
The medical pod is not deceived.
The medical pod can be recently-activated.
The medical pod can be operated.
The medical pod is not operated.


Understand "medical" or "pod" or "scanner" as the medical pod.

Understand  "activate [medical pod]" or "reactivate [medical pod]" or "re-activate [medical pod]" as using.

After entering medical pod:
	try using the medical pod.
	
Instead of opening the medical pod:
	try using the medical pod.

Instead of using the medical pod when the holder of the player is the Infirmary:
	try entering the medical pod.
	
Instead of opening the medical pod, try entering the medical pod.

Instead of using the medical pod:
	now the medical pod is recently-activated;
	if the medical pod encloses the broken antique pig bone:
		say "You sit back in the medical pod, resting your leg over the broken pig bone and wait for the scan to begin. [if the medical pod is operated]Once again t[otherwise]T[end if]he scanning tablet [if the medical pod is not operated]seems to have a torch attached to it, which[end if] runs quickly down your body, however when it gets to your legs it pauses once it detects the broken bone. It will take a few moments for it to work out your deception.";
		now the medical pod is deceived;
	otherwise:
		say "You sit down in the medical pod and wait for a few seconds. You know the drill, it takes a few moments for the system to detect a human presence before it begins the scan. The scanning tablet comes out of an overhead compartment and quickly moves down across your body ";
		if the glass case is detectable or the antique pig bone is detectable:
			say ", but stops once it reaches the [antique pig bone] you're carrying[if the medical pod is not operated].  A torch is attached to the tablet[otherwise]: this may be your opportunity to take the torch[end if].";
		otherwise if the not useless synthetic eye is detectable:
			now the synthetic eye is useless;
			say ". The scanning tablet[if the auroscope is not known], which has a torch attached to it, [end if]pauses briefly when it reaches the synthetic eye your carrying, but it's no fool. It soon detects that the eye isn't organic and quickly finishes its scan.";
		otherwise:
			say "Though lighting is dim in here, it has a torch attached to the tablet to illuminate your body throughout the scan.";
	now the medical pod is operated;
			
Every turn when the medical pod has been recently-activated for 1 turn and the medical pod is not deceived:
	if the player is in the medical pod:
		say "The scanner finishes its scan.";
	now the medical pod is not recently-activated.
	
Every turn when the medical pod is deceived and the auroscope is part of the medical pod:
	if the medical pod has been deceived for 5 turns:
		now the medical pod is not deceived;
		if the medical pod is visible:
			say ". The scanning tablet finishes analysing the pig bone and retreats to the safety of the medical pod."

Instead of taking the medical pod, say "It's really, really, really, really heavy. So you leave it where it is.".

Definition: something is detectable:
	if it is enclosed by the medical pod then decide yes;
	otherwise decide no.
	
Instead of using something detectable when the player is in the medical pod:
	try using the medical pod.
	
Instead of hitting the medical pod with something when the medical pod has been recently-activated:
	say "You whack the pod with the [second noun] in frustration hoping to disable the infernal thing for a just a few moments [if the medical pod is operated]so you can take the torch[end if] but nothing happens. If you can't use brute force to beat the pod then you'll just have to use cunning and deception."
	
Instead of hitting the medical pod with something:
	say "You hit the medical pod with the [second noun] but nothing happens."
	
Instead of hitting the medical pod with something when the auroscope is handled:
	say "There's no need to physically damage the infernal machine now that you've got the torch.";
	
Instead of entering or using the medical pod when the auroscope is handled:
	say "What a sore loser! The machine's shut itself down in a sulk."
	

Section - Auroscope

The auroscope is a device. The auroscope can be known or not known. The auroscope is not known.
The auroscope is part of the medical pod. 
The description of the auroscope is "It's one of those little torches Doctors use to look in people's ears. You think it's called an auroscope."

Understand "torch" or "light" as the auroscope.

The printed name of the auroscope is "torch".

Understand "tablet" as the auroscope when the auroscope is part of the medical pod.

Before taking the auroscope when the auroscope is part of the medical pod:
	if medical pod is deceived:
		say "Using the scanner's indecision to your advantage you grip on to the torch and begin to pull at it. Just then the scanning plate begins to pull away, having clearly worked out the bone is not actually a part of your leg. It tries to take the torch with it, but after a brief moment of tug-of-war you are victorious and the torch comes free in your hands while the scanner shuts itself down in a sulk.";
		now the player carries the auroscope instead;
	otherwise:
		say "[if the medical pod is recently-activated and the antique pig bone is not enclosed by the medical pod]The scanning tablet moves too quickly for you, detecting no broken bones or injuries the tablet and torch are sealed back inside the unit before you can grab it.[otherwise if the medical pod is recently-activated and the antique pig bone is enclosed by the medical pod]Detecting no breakages to the pig bone, the torch moves too quickly for you to grab.[otherwise]The torch has been sealed back inside the unit. Going to need to reactivate the scanner again.";
		if the auroscope is not known:
			say "[line break]Muy cheraf! You really need that torch. Maybe if you could simulate an injury, the scanning tablet might stay out long enough for you to take the torch, but you're not too keen on breaking an arm just to test the idea.";
		now the auroscope is known;		
		reject the player's command.

Instead of using the auroscope:
	if the auroscope is part of the medical pod:
		say "You can't do anything with the auroscope while it is still inside the medical pod.";
		reject the player's command;
	otherwise:
		if the auroscope is unlit:
			try switching on the auroscope;
		otherwise:
			try switching off the auroscope.

Carry out switching on the auroscope:
	now the auroscope is lit.
	
Carry out switching off the auroscope:
	now the auroscope is unlit.

Instead of doing something other than taking with the auroscope when the auroscope is part of the medical pod:
	say "You're not going to be able to do anything with the torch while it's part of the medical pod."


Chapter - Top Deck Aft Corridor

[All content for this location is taken from the following web page;

http://textadventure.org.uk/index.php?title=Spaceship:Top_Deck_Aft_Corridor&oldid=6108

]

Section - Location Description

The Top Deck Aft Corridor is a room. 
It is unscored. 
The Top Deck Fore Corridor is fore of the Top Deck Aft Corridor.

The top deck aft corridor is a room. "The aft section of the top deck contains a strange juxtaposition of rooms. To the starboard is the ship's infirmary, dedicated to the preservation of all life; whilst on the port side is the armoury, devoted to destruction and death. The aft houses the airlock, the only means of leaving the ship apart from the escape pod. The rest of the ship is at the fore end of the corridor.".

Instead of going nowhere from the Top Deck Aft Corridor:
	say "There's no way to go up or down from here.".

The top deck aft corridor is aft of the top deck fore corridor.

After going to the top deck aft corridor when the armoury door is bryan-opened for the first time:
	say "That's strange. You notice a small dent on the armoury door.".
						

Section - Inner Airlock Door

Instead of opening the access denied closed inner airlock door when the access panel is not passcode-aware:
	now the access panel is passcode-aware;
	say "You need to type the security passcode into the access panel to open this door.

Only you and Commander Suze know the password to avoid any drunken mistakes. If only you could remember it.. let's see.... you always forget this so Suze told you a mnemonic story to remember it...what was it again. Ah, yes: Inside the [bold type]shoe[roman type] lived the fiery [bold type]sun[roman type] which took the [bold type]key[roman type] to open the [bold type]gate[roman type] to [bold type]heaven[roman type]. Words in the story should map on to the correct numbers."

Instead of opening the access denied closed inner airlock door:
	say "You need to type the security passcode into the access panel to open this door.".
	
Instead of going through the access denied closed inner airlock door for the first time:
	say "The airlock door is closed. You should be able to use the access panel to open it though."
	
After closing the access permitted inner airlock door in the Top Deck Aft Corridor:
	say "You type the passcode into the access panel and close the door." .

Instead of examining the closed inner airlock door in the Top Deck Aft Corridor:
	say "The door stands almost the full length and height of the corridor. To the right of the door is an access panel.".
	
Instead of examining the open inner airlock door in the Top Deck Aft Corridor:
	say "It's open and leads through to the airlock.".
	
Instead of opening the closed access permitted inner airlock door in the Top Deck Aft Corridor:
	if the access panel is squished:
		continue the action;
	otherwise:
		say "You type the passcode into the access panel and open the door.";
		now the inner airlock door is open.


Section - Airlock Access Panel

The access panel is here. It is scenery.  "A rather chunky numbered keypad. It's got all the single-digit numbers you could possibly imagine, ranging from number 0 all the way up to number 9. This is used to allow authorised personnel to access the airlock.[if airlock door is access denied] Only you and Commander Suze know the password to avoid any drunken mistakes. If only you could remember it.. let's see.... you always forget this so Suze told you a mnemonic story to remember it...what was it again. Ah, yes: Inside the [bold type]shoe[roman type] lived the fiery [bold type]sun[roman type] which took the [bold type]key[roman type] to open the [bold type]gate[roman type] to [bold type]heaven[roman type]. Words in the story should map on to the correct numbers.[end if]".

Understand "control panel" or "security panel" as the access panel.

The access panel can be passcode-aware. The access panel is not passcode-aware.

After examining the access panel: now the access panel is passcode-aware.
		
Before inputting 21387 on the access panel:
	if the inner airlock door is access permitted:
		try opening the airlock door;
	otherwise:
		change the inner airlock door to access permitted;
		change the inner airlock door to unsealed;
		change the inner airlock door to open; 
		say "You tap the number onto the panel. The display briefly flickers the text 'Opening door. Please stand well back.' You duly oblige, and the airlock door, after a brief stutter, slides open.".

To decide whether requestingPasscode:
	if the command prompt is "Please enter the 5 digit passcode: " then decide yes;
	otherwise decide no.
		
Instead of using the access panel when the inner airlock door is access denied closed:
	change the command prompt to "Please enter the 5 digit passcode: ";
	
Instead of using the access panel:
	try opening the inner airlock door.
	
After reading a command while requestingPasscode:
	if the player's command matches "21387":
		try inputting 21387 on access panel;
		change the command prompt to "> ";
		reject the player's command;
	otherwise if the player's command matches "79655":
		change the command prompt to "> ";
		say "Wrong passcode -- wrong passcode for accessing the airlock anyway.[one of][line break]That's strange, this panel seems to be giving you advice. You didn't know it was programmed to do that......nice feature![or][stopping]";
		reject the player's command;
	otherwise:
		change the command prompt to "> ";
		say "Wrong passcode!!!";
		reject the player's command. 


Section - Ways to not use the access panel
	
The access panel can be squished. The access panel is not squished. 

Before opening the inner airlock door in the top deck aft corridor when the access panel is squished for the first time:
	say "Phew, smashing the access panel seems to have done the trick."

Instead of doing something other than examining with the squished access panel:
	say "You're not going to be able to do anything with the panel any more. Not with the state it's in."

Instead of examining the squished access panel:
	say "All that's left of the panel are a few wires sprouting up out of a crumpled casing."
	
Instead of putting something on the access panel:
	try hitting the access panel with the noun.
	
Instead of unlocking the access panel with something:
	try hitting the access panel with the second noun.	
	
Definition: something is heavy:
	if it is the spanner then decide yes;
	if it is the hanger then decide yes;
	if it is the hammer then decide yes;
	if it is the shovel then decide yes;
	otherwise decide no.
	
Instead of hitting the access panel with something heavy:	
	now the access panel is squished;
	now the inner airlock door is access permitted;
	say "Technology, you go squish now! You hit the access panel repeatedly using the [second noun] until all that's left is a smashed casing with a few wires sprouting out of it. God, you hate those mnemonic stories. You just hope that the airlock door opens now, otherwise you'll never be able to get into the airlock."
	
Instead of attacking the access panel:
	say "You punch the access panel with your fist, but you hardly make a dent."
		
Instead of hitting the squished access panel with the spanner:
	say "You've already done as much damage as you could possibly do. Any further attacks would be more akin to corpse desecration."
	
Instead of hitting the squished access panel with the spanner for the second time:
	say "You desecrate the corpse of the access panel."
	
Instead of hitting the access panel with the small statue, say "Just as you go to strike the access panel with the statue, a strange, numbing fear comes comes over you until you have no choice but to put the statue back into your capacious inventory."

Instead of hitting the access panel with the plush towel, say "You wrap the towel around the access panel, hoping that the airlock door is controlled by infra red and try to open the airlock door, but nothing happens."
	
Instead of hitting the access panel with the plunger:
	say "You whack the access panel with the plunger but its not heavy enough to cause the panel any harm."
	
Instead of using the can of packing foam on access panel:
	now the access panel is foamy;
	say "You don't see how making the panel foamy is going to help you open the airlock door.".
	
Instead of spraying the can of packing foam over the access panel:
	try using the can of packing foam on the inner airlock door.
	
Instead of hitting the access panel with the packing knife:
	say "It's no good, the packing knife is only designed to cut foam, so you'll never be able to cut through the metal casing of the access panel with it."
	
Instead of using the packing knife on the access panel:
	try hitting the access panel with the packing knife.
	
Instead of cutting the access panel with the packing knife:
	try hitting the access panel with the packing knife.
	
Instead of using the string on the access denied inner airlock door:
	say "You raise the string above your head and start swinging it like a lassoo. Once the lasso has built up sufficient momentum you aim it towards the access panel. Bingo! The lassoo is wrapped around the panel. You give it a tug a few times. Then a few times more. Nothing happens. You remove the string from the access panel and decide to try and think of another way to open the airlock door."
	
Instead of hitting the access panel with the string, say "You batter the access panel as viciously as you can with the string but cause no damage."

Instead of using the small lemon-scented moist hand towel on the access panel:
	say "You wipe the access panel hoping that you might accidentally input the correct passcode into the panel but it doesn't work."
	
Instead of hitting the access panel with the lemon-scented towel, say "You unleash seven shades of lemon scented fury on the panel but nothing happens."

Instead of headbutting the access panel:
	say "You charge at the access panel as fast as you can -- Bang, the case of the access panel crumples. You charge again. And again. And again until all that's left of the panel are a smashed casing with a few wires sticking out.";
	now the access panel is squished.
	
Instead of using the helmet on the access panel when the helmet is worn:
	try headbutting the access panel.
	
Instead of using the pliers on the access panel:
	say "You whack the access panel with the pliers but it's too small to cause any damage".

Instead of using the whisk on the access denied inner airlock door:
	say "You start the whisk rotating using both hands and thrust it onto the access panel's keypad, hoping by some stroke of luck that the whisk might hit the correct passcode but unsurprisingly nothing happens.";
	silently try dropping the whisk.
	
Instead of using the bicycle repair kit on the access panel:
	say "That probably isn't going to work. There nothing wrong with the access panel. It's functioning perfectly. If you only your brain was, you could remember the correct code to input into the panel."
	
Instead of hitting the access panel with the whisk:
	try using the whisk on the inner airlock door.
	
Instead of using the mini fuel canister on the access panel:
	say "You stand for a second, trying to think of a possible way to use the mini-fuel canister with the access panel but nothing comes to mind."
	
Instead of hitting the access panel with the mini fuel canister:
	say "There may be tiny possibility that upon striking the access panel with the fuel canister, the access panel will be disintegrated and by some quirk of fate, access will be allowed to the airlock. But after weighing up the odds you decide that that probably wouldn't be the best course of action."
	
Instead of using the auroscope on the access panel:
	if the auroscope is switched off:
		say "(first switching on the auroscope)[command clarification break]";
	say "You shine the light on door, studying the access panel carefully. Yep, that's an access panel all right."
	
Instead of hitting the access panel with the auroscope:
	say "You mash the torch into the access panel's keypad but don't hit the correct passcode."
	

Chapter - Top Deck Fore Corridor

[All content for this location is taken form the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Top_Deck_Fore_Corridor&oldid=6111

]

Section - Location Description

The Top Deck Fore Corridor is a room. 
It is unscored. 
Down from the Top Deck Fore Corridor is the Middle Deck Fore Corridor.

The description of the top deck fore corridor is "[top deck fore description]."

To say top deck fore description:
	if the top deck fore corridor is unvisited:
		say "The overhead lighting panels are out here, and the area is lit only by the dull blue glow of the emergency lighting.[paragraph break]";
	if the top deck fore corridor is emergency powered:
		say "The corridor, like most of the rest of the ship, is narrow and cramped. The [bridge door] to the fore is surrounded by glowering [LED lights], indicating an emergency lockdown; port lies your personal quarters[if the top deck fore corridor is unvisited], where you just came from[end if]; to the starboard is the ship's briefing room; and aft lies the rest of the top deck. In the corner, the ladder leading down to the other decks resembles a dark pit even blacker than the view from your quarters['] porthole";
	otherwise if the top deck fore corridor is fully powered:
		say "The corridor, like most of the rest of the ship, is narrow and cramped. The [bridge door] to the fore [if the bridge door is not activated] is surrounded by glowering [LED lights], indicating an emergency lockdown[otherwise] is operational[end if]; port lies your personal quarters; to the starboard is the ship's briefing room; aft for more corridor fun. In the corner is the ladder leading down to the other decks";
		
Instead of going up in the Top Deck Fore Corridor:
	say "You're as far up as this ship allows, both physically and in rank.".


Section - Eaten by the Grue

Instead of going down from the Top Deck Fore Corridor when the player is not carrying the lit auroscope for the first time:
	say "Are you sure? It's very dark, and you are likely to be eaten by a space-grue.";
	
Before going down from the Top Deck Fore Corridor when the player is carrying the unlit auroscope for the first time:
	say "Are you sure? It's very dark, and you are likely to be eaten by a space-grue. (Remember, torches usually need to be switched on before affording grue-warding protection.)[line break]" instead.
			
Instead of going down from the Top Deck Fore Corridor when the player is not carrying the lit auroscope:
	say "There is a space-grue. It's quite grotesque. Your second to last thought is 'How the hell did a space-grue get on the ship?' Needless to say, your very last thought is the absolute utter agony of laser-sharp teeth puncturing your body, your flesh ripped and torn from your fragile form, your spacesuit's precious atmosphere dissipating all around, leaving you unable to vocalise your abject torment. In space, no-one can hear you scream.";
		end the game saying "[yourDead]";
	

Section - Top Deck Ladder
		
A ladder is a kind of prop.

A ladder called the top deck ladder is in the Top Deck Fore Corridor. 
The description is "[if the middle deck fore corridor is unpowered]It leads down into a pit of darkness.[otherwise]It leads down to the middle deck.".

After examining the top deck ladder when the auroscope is not carried by the player for the first time:
	say "It's pitch black down there...there must be a torch around here somewhere.".

Instead of climbing or entering or using the top deck ladder:
	try going down using the top deck ladder.



Section - LED lights

Colour is a kind of value. The colours are green and red. The LED lights have colour. The LED lights are red.

Understand the colour property as describing the LED lights.

Before printing the name of the LED lights:
	say "[colour] "

Some LED lights are part of the bridge door. The description is "[if bridge door is activated]The lights are green, meaning the bridge door is usable.[otherwise]The lights are red, indicating an emergency lockdown.".

Understand "led's" or "led" or "leds" or "lights" or "light" as "[LED lights]". Understand "glowering [LED lights]" as the LED lights. 

Every turn:
	if the bridge door is activated:
		now the LED lights are green.
		
Instead of attacking the LED lights, say "[if the bridge door is not open]The lights are not in any way the source of the door's problem, they're just doing their job. If you were to smash them, you still wouldn't be able to open the door. Leave the lights alone you horrible little monster.[otherwise]The lights are delivering you good news and you just want to smash them? Have some gratitude.".


Section - Retinal Scanner

A retinal scanner is in the top deck fore corridor. It is scenery. The description is "This is the retinal scanner for emergencies to ensure only authorised personnel can enter the bridge. Thankfully you are authorised, it's your ship.[if we have not examined the retinal scanner][paragraph break]You installed it a few months ago to replace your outdated fingerprint scanner after replicants tried to take the ship by assuming the form of Commander Suze. It didn't surprise you that she'd attempt a mutiny, but it was all too well planned to be her handiwork. They'd already set the ship on course for Alwidia before Doc managed to flood the bridge with a lethal toxin, and the smell still won't come out of your chair. Thankfully replicants can't duplicate the complex structure of the human eye, so this device is much safer. Unfortunately, the increased popularity of these devices has seen a significant rise in activity of the black market eye-gougers. A far more frightening threat.".

Understand "standard spec retinal scanner" or "recently installed retinal scanner" as the retinal scanner.

Instead of attacking the retinal scanner for the first time:
	say "Taking your frustration out on the scanner might make you feel a little better about your situation, but it's not going to help solve the problem.".
	
Instead of attacking the retinal scanner for the second time:
	say "To hell with solving the problem! You change to a Bruce Lee stance, gently tug on the top of your spacepants a couple of times, make a couple of twitchy bird noises, and launch yourself into a vicious roundhouse kick. In doing so, you predictably fall on your arse, shattering your helmet on the floor. As your vision starts to fade, the last thing you see are the [LED lights] change to green.";
	 end the game saying "[youAsphyxiate][line break][yourDead]".
	
Instead of switching on the retinal scanner:
	if repressurising the ship has not ended:
		say "You half-heartedly attempt to use the scanner again but stop once you realise that you're just wasting precious time and oxygen; unless you can find a way to repressurise the ship so you can take off your helmet, there's simply no way you can access the bridge. Nevermind, you've been in trickier situations than this before -- the escape from that prison on Organswept comes to mind. You should be able to repressurise the ship from the engine room, as long as there are enough gas cylinders in the repressurisation storage rack.";       
	otherwise:
		say "[if the helmet is worn]With the ship now reasonably stable it should be safe to open your helmet visor. With the visor open you breath the ship's stale air and are almost overwhelmed by the bizarre mix of smells you've been deprived off. Focusing on your mission, you[otherwise]You[end if] press your eye against the scanner, and within a few beeps the scanner goes green and the bridge slides open.";
		now the bridge door is open;
		now the bridge door is openable.
		
Instead of switching on the retinal scanner when repressurising the ship has not ended for the first time:
	say "You activate the scanner and stare into the red light. You breathe in deeply, feeling confident; you've never met a problem yet that couldn't be solved from the comfort of the captain's chair. Your chair. You gently nod your head in a cocksure manner, and wait for the scanning to complete. That's strange, it seems to be taking an awfully long time. Patience, you think to yourself. All good things come to those who -- what the hell's up with this thing! You move your head closer to the red light...geez! It seems to be refracting off the glass of your helmet! You nervously shift your head around the red light, hoping to find an angle that the beam might find agreeable but can't find one. If you can't use this scanner, you'll never be able to access the bridge. You shake your head in utter disbelief, cursing Commander Suze, who's supposed to be in charge of ship safety."
	
Understand "use [retinal scanner]" as switching on. 
Understand "activate [retinal scanner]" as switching on. 
Understand "operate [retinal scanner]" as switching on.

Instead of pushing the retinal scanner:
	try switching on the noun.
	
Instead of searching the retinal scanner:
	try switching on the retinal scanner.
	
Section - Ways to not use the retinal scanner

Instead of using something on the retinal scanner:
	say "Really, there's only one way to get this scanner to allow access. And that's by using it as God intended -- to scan your eyes."
	
Instead of hitting the retinal scanner with something:
	say "You raise the [second noun] to whack the scanner but then think better of it; damaging the scanner is unlikely to cause the bridge door to open. In any case, there are probably some security mechanisms in place to prevent it from being manipulated by force."
	
Instead of hitting the retinal scanner with something for the second time:
	say "You raise the [second noun] up over your head and swing at the scanner. As soon as you make contact, you see a flash of light and feel a searing pain run up your arm and through the rest of your body. You collapse, body convulsing, writhing in agony, foaming at the mouth before mercifully blacking out...";
	end the game saying "...and you never regain consciousness."


Section - Poker Shedule

A prop called the briefing room notice is in the Top Deck Fore Corridor. The description is "At it's center is printed 'Briefing Room'. To the left of this is a column of scrawled handwriting. It's the crew's poker night schedule.".

A poker night schedule is a part of the  briefing room notice. The description is "It's the crew's poker schedule. According to it, after the crew return there is going to be a week long tourney. Every night for 7 days, starting at 0700. If the crew have a ship to return to, that is.".

Understand "piece of paper" or "paper" as the briefing room notice.

Instead of taking the briefing room notice:
	say "The crew need that there to see the poker schedule.".


Part - Middle Deck

Chapter - Locations in the region

The Middle_Deck is a region. The Canteen, the Crew's Quarters, the Crew's Toilets, the Escape Pod Room, the Kitchen, the Middle Deck Aft Corridor, the Middle Deck Fore Corridor, and the Rec Room are in the Middle_Deck.


Chapter - Canteen

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Canteen

]

Section - Location Description

The Canteen is a room. 
Aft of the Canteen is the Kitchen.
The description of the canteen is "The canteen looks as dull and functional as the food it serves. Though only a fool would dare tell Hudson that's what you all thought of his cooking. [if the helmet is worn]You suspect that smell of over-boiled re-hydrated cabbage still lingers. Thankfully your helmet spares you the odour. [otherwise]A smell of over-boiled re-hydrated cabbage still lingers.[end if] The arrangement of four brown plastic seats bolted to the floor surrounding each of the six beige formica tables reminds you far too much of service stations that don't seem to have come on much in design since the 20th century, though of course now they're in space. The food is served from a long stainless steel counter, with a rim to slide trays along and heated recesses for the various foodstuffs. [if unvisited]The walls were originally decorated with inspirational images of great space faring accomplishments, though over time the crew have stuck photos of their own drunken antics over the top.[end if]".

Instead of exiting in the Canteen when the holder of the player is the Canteen:
	try going port.

The canteen door is a doorway. 
The canteen door is starboard of the Middle Deck Fore Corridor and port of the Canteen.

Rule for writing a paragraph about the closed canteen door:
	if the location is the canteen:
		set the locale priority of the canteen door to 1;
		say "There's a white gloopy substance sliding down the door; it looks like Smash.";
	otherwise:
		set the locale priority of the canteen door to 0;

Rule for writing a paragraph about the open canteen door:
	if the location is the canteen:
		set the locale priority of the canteen door to 1;
		say "It's open and leads to the middle deck corridor.";
	otherwise:
		set the locale priority of the canteen door to 0;


Section - Tables and Chairs

Some beige tables are a scenery supporter in the canteen.
The description is "An uncovered, circular-topped Formica table. On special occasions, Hudson covers the tables with a pvc cloths consisting of a red and white check print finish.[if the holder of sauce bottle is beige tables] On one of the tables is a tomato sauce bottle.[end if]".

Understand "beige" or "tables" or "table" as beige tables.

A brown seat are a chair.
A brown seat are in the canteen.
A brown seat are scenery.
The description is "The seats appear to be made of a slightly pliable brown plastic. Grouped in pairs either side of each table and bolted to the floor. Considering the bargain basement suppliers you used when buying furniture you suspect that the seats were rescued from a scrap heap. ".

Understand "brown" or "seats" or "seat" or "pliable" or "plastic" or "chair" as brown seat.

After entering a brown seat, say "Yep, they are as uncomfortable as they look.".


Section - Pictures

Some drunken pictures are a prop in the canteen.
The description is "Fixed over the top of the supposedly inspirational images of the development of space exploration are your crew's own photos. Mostly they're attempts at being wacky while drunk on shore leave, but those were your crew are clearly inebriated on duty worry you a little more.".

Understand "photos" or "photo" or "picture" or "images" or "inspirational images" as drunken pictures.

Instead of taking drunken pictures, say "The photos don't interest you as you're not in any of them, you've already confiscated any such blackmail material.".


Section - Vending Machine

A vending machine is in the Canteen. It is fixed in place. 

Understand "cosmic juice" or "juice" as the vending machine.

Instead of buying the vending machine:
	try using the vending machine.

Rule for writing a paragraph about the vending machine:
	say "In the corner of the canteen stands a vending machine[if the not handled plastic cup is in the location] and a plastic cup[end if]."

The description of the vending machine is "The vending machine dispenses a brand of soft drink called 'Cosmic Juice'. On the front of the machine are pictures of the torso of a rugged, impossibly good looking man, with square chin, two beautiful women on his arms, and a fleet of horribly beweaponed battle cruisers behind him."

Instead of using the vending machine:
	if the helmet is worn:
		say "[if the plastic cup was on-stage]You wait for a few moments, but nothing at all comes out of the vending machine this time.[otherwise]After a few seconds, from out of the vending machine shoots a empty cup -- that's bizarre, this machine's supposed to drop cans of soda...? Something must be wrong with the computer's AI.";
	otherwise:
		say "A stentorian voice starts bellowing from the vending machine's speaker.....speaker? You didn't think vending machines had speakers.

'Thank you for purchasing a can and/or bottle of COSMIC JUICE TM, the preferred drink for all lonely space faring men and women. COSMIC JUICE TM would like to inform the potential drinker of this substance that following the legally enforced UN drinks act of 2069, this drink confirms to all statutory advertising regulations around the promotion of carbonated drinks products through promises of increased attractiveness and improved lifestyle.

Since the collapse of the entire carbonated drinks industry in 2065 after a series of litigations from ugly losers (who challenged the ability of a drink product to radically improve their life outlook) COSMIC JUICE TM was released to widespread acclaim in 2070, and is now the only mainstream soft drink that will scientifically improve your life in line with the promises outlined in our recent holovisual advertising campaign.

The unique ingredient within COSMIC JUICE is a parallel dimensional barrier suppressant which will operate in a small quantum field while the drink is being consumed and for around 30 seconds afterwards. COSMIC JUICE TM has been specially tailored to actively replace you in this universe with a better looking, more successful, luckier and altogether cooler version of yourself by temporarily projecting your entire life history into another dimension, and swapping a better one back into this universe. The result? You can experience all the fun and excitement of being a lucky lifelong charmer who is attractive to the opposite sex with no long term effects on your current shallow and pointless existence.

All this with a faint cherry tang and added Vitamin C'.";
		if the plastic cup was off-stage:
			say line break;
			say "A plastic cup shoots out of the vending machine. What the hell! After all that, all you get is an empty plastic cup? Something must be up with the computer's AI.";
		otherwise:
			say line break;
			say "Nothing comes out of the vending machine, the computer's AI has gone completely loco."

There is a thing called an plastic cup. The description of the plastic cup is "A typical plastic cup that looks like it was dispensed from a Romford paper merchants' vending machine."

Before using the vending machine for the first time:
	move the plastic cup to the Canteen;
		
Instead of attacking the vending machine:
	say "You give the machine a kick to get it working, but nothing happens.";
	try using the vending machine.

Understand "kick [vending machine]" as attacking.


Section - Counter

A serving counter is a scenery supporter in the canteen.
The description is "The counter is spattered with unknown food residues, and looks like it hasn't had a wipe in ages.[if the not handled lighter is on the serving counter] Hudson's plasma lighter has been left here.".

Understand "stainless" or "steel" or "counter" or "stainless steel" or "stainless steel counter" or "stainless counter" or "steel counter" as serving counter.

Instead of rubbing the serving counter, say "Captain's don't clean. That's rule number two in this Captain's handbook, after the one about your own private toilet.".

There is a thing called a lighter. It is a device. The lighter is on the serving counter.
The description is "A state of the art plasma lighter that doesn't even need oxygen to ignite.".
Understand "use [lighter]" as switching on.


Section - Recesses

Some recesses are a part of the serving counter.
The description is "These troughs would normally hold a large quantity of mostly re-hydrated foods, but at the moment they're empty. Probably for the best.".

Understand "recess" or "heated recess" or "heated recesses" as recesses.


Section - Tomato Sauce

A sauce bottle is on a beige tables.
The description is "A tomato shaped blob of squeezable plastic used for holding tomato sauce.".

Understand "squeezable" or "tomato shaped" or "tomato shaped bottle" or "tomato bottle" or "squeezable bottle" or "tomato sauce container" or "tomato sauce" or "tomato container" as sauce bottle.

After taking sauce bottle for the first time, say "You take the bottle and gleefully imagine some of the crazy situations where this may come in handy: to change the trajectory of an oncoming space bull, to grease the machinery of a broken cuckoo clock, to fake your own gory demise at the hands of an uncharacteristically remorseful space zombie. The possibilities are infinite.".

Instead of squeezing sauce bottle, say "Typical, it's clogged. You've never been so disappointed in your entire life.".

Instead of shaking sauce bottle, say "You shake it vigorously but it isn't going to work. This is an outrage.".


Chapter - Crew's Quarters

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Crew%27s_Quarters

]

Section - Location Description

The Crew's Quarters is a room. "[if unvisited]When you bought the ship you figured the only way you'd get crew to stay on board is if you gave them some really nice quarters to while away their evenings. You hired Carol, a ship interior designer friend of yours, to draw up plans for the most comfortable and relaxing quarters that could be accommodated. The plan was a perfect mix of colours, lighting and simulated smell to create an aura of great peace and restfulness. Of course it all went out of the window when you saw the cost of actually implementing even half of her proposals. In the end you bought three cheap double bunks and whatever lockers and trunks you could liberate from the supply dock without the staff noticing what you were up to.

Not one to totally ignore morale you put up a mockup photograph of Carol's original design over the single yellowing basin in the corner and just visible behind the fetid rising steam from the WC waste air vent pipe. You also eventually had to add soundproof privacy screens to the bunks after your second trip where you were woken in the middle of night to find a bout of snoring by the Doctor had brought about a near riot amongst his roommates.

[end if]On the left hand side of the room is the double bunk shared by Suze and Helen. There's a large locked trunk at the foot of the bed where they store their personal items, though much of Suze's seem scattered across her bed. There is also a shelf mainly used by Helen, littered with her engineering tools.

In the middle is the bunk where Hudson and Johnson sleep. You wonder if keeping their sleeping area in such a mess is a matter of pride for them.

The right wall holds Doc's bed and the spare bunk, occasionally occupied by anyone foolish to come aboard as a passenger. It looks like he's taken his storage trunk with him.".

The crew's quarters door is a doorway. 
The crew's quarters door is port of the Middle Deck Fore Corridor and starboard of the Crew's Quarters.

Instead of exiting in the Crew's Quarters when the holder of the player is the Crew's Quarters:
	try going starboard.


Section - The crew's bunks

Helen's bunk, Suze's bunk, Hudson's bunk, Johnson's bunk, Doc's bunk, and the spare bunk are bunks in the Crew's Quarters.

[HELEN'S BUNK]

The description of Helen's bunk is "Apart from oil and grease stains it's pretty bare.".

Understand "helens bunk" as helen's bunk.

[SUZE'S BUNK]

The description of Suze's bunk is "Suze seems incapable of anything vaguely resembling tidiness, with clothing, and accessories scattered in disarray. You wonder how she sleeps here.".

Understand "suzes bunk" as suze's bunk.

[HUDSON'S BUNK]

The description of Hudson's bunk is "A white shirt lies on Hudson's bunk. For some reason there's a big patch of what looks like blood soaked all across the middle of the shirt and one of the buttons.".

Understand "hudsons bunk" as hudson's bunk.

[<--- BLOOD RED SHIRT]

A blood red shirt is on hudson's bunk. The description is "What happened here? You don't recall any major injuries on board ... lately!!".

Instead of taking the blood red shirt, say "Ewww...you'd rather not. The button attached to it may come in handy though.".

[<< --- RED SHIRT BUTTON ]

A bloody button is part of the blood red shirt. The description is "[if the bloody button is part of the distress signal]Remarkable, the shirt button is a perfect fit.[otherwise]A big, red -- and slightly sticky -- button.".

Before of taking the bloody button for the first time:
	now the bloody button is on hudson's bunk;
	say "With a little force you pull the blood soaked button free from the soiled shirt.".

[ JOHNSON'S BUNK]

The description of Johnson's bunk is "Typical -- Krull bed sheets.".

Understand "johnsons bunk" or "krull bedsheets" or "bedsheets" as johnson's bunk.

Instead of entering Johnson's bunk, say "No way, the Krull bedsheets are creeping you out.".

[THE DOC'S BUNK]

The description of Doc's bunk is "It's meticulously clean.".

Understand "Docs bunk" as doc's bunk.

[THE SPARE BUNK]

The description of the spare bunk is "The spare bunk is empty at the moment, with no bedsheets or pillows. Just a tired looking mattress.".


Section - Suze and helen's trunk

A thing called Suze and helen's trunk is a closed  scenery container in the crew's quarters. The description is "A rather large trunk sits at the foot of the left bunk bed. This is shared by Suze and Helen to store their personal effects. It's got a rather secure looking biometric lock on it so you're not really convinced you're going to be able to break into this. To be honest that's for the best, opening this probably won't help your mission and will almost certainly bring a world of pain upon you when Suze gets back."

Understand "suzes trunk" or "suze's trunk" or "helens trunk" or "helen's trunk"  or "large trunk" as suze and helen's trunk.

Instead of opening suze and helen's trunk:
	say "The lock is secure by DNA and fingerprint imprints. It's not going to open for you anytime soon."


Section - The shelf and the EVA joystick

Helen's shelf is a scenery supporter in the Crew's Quarters. "The simple shelf near the left bunk bed is scattered with a handful of small and bizarre engineering tools. [if the not handled EVA joystick is on helen's shelf]Sat on the shelf you see a small control stick[otherwise]Most of it looks useless to you, but you imagine Helen finds each and every piece invaluable[end if].[if something handled is on helen's shelf] Also on the shelf is [a list of handled things that is on the shelf].".

Instead of taking helen's shelf, say "The shelf is fixed tightly to the wall.".

Understand "engineering tools" or "tools" as helen's shelf.

[< --- EVA JOYSTICK]

An EVA joystick is on helen's shelf. The description is "This is the control system for the ship's EVA pack. Helen must have been working this in her spare time. She never stops.".

Understand "control system" or "small control stick" or "stick" or "small control stick" or "control stick" as the EVA joystick.

The printed name of the EVA joystick is "small control stick".

Does the player mean inserting something into the EVA joystick: it is unlikely.

Does the player mean putting something on the EVA joystick: it is unlikely.


Section - Johnson's Locker

Johnson's locker is a crewman's locker in the Crew's Quarters. Johnson's locker is not scenery. The initial appearance of Johnson's locker is "Near the port wall lies Johnson's locker."

Understand "Johnsons locker" or "johnsen's locker" or "johnsens locker" as johnson's locker.

Inside Johnson's locker is a distress signal, a film collection, and some kids action figures.

[< --- THE FILM COLLECTION]

The description of the film collection is "A giant rack of pirated micro-ray disc sci-fi movies.".

Understand "films" or "movies" as "[movies]". 
Understand "sci-fi [movies]" or "sci fi [movies]" as the film collection.

Instead of taking the film collection:
	say "This isn't the time for watching sci-fi movies.".
	
[< --- THE ACTION FIGURES]
	
The description of the kids action figures is "A motley collection of 20th century sci-fi action figures.".

Understand "collection of action figures" or "motley collection" or "motley collection of action figures" as the action figures.

Instead of taking the action figures, say "It's probably not going to be worth the effort of carrying these around with you.".

Instead of examining the closed johnson's locker:
	if Johnson's locker has not been unlocked:
		say "The ship's fool, Johnson grew up on an unhealthy diet of sci-fi films and seems far too divorced from reality for comfort. He joined the crew because he was desperate to go into space and pretty much no one else would take him. At the time you assumed the tedious crushing reality of space haulage would shatter his resolve but so far there's been no sign of progress.";
	otherwise:
		continue the action.
	
Instead of examining the open johnson's locker for the first time:
	say "Looks like he took most of his junk with him. Inside you find his film collection, some kids action figures, and wait a minute, what's that tucked away at the bottom. That's your distress signal. This went missing months ago.".

Before opening locked Johnson's locker, say "[if johnson's locker has not been unlocked]You tug at the door, surprised to find the locker is actually locked. All of these things come with a standard programmable security panel but you've never seen anyone use them. There's no privacy out here so what's the point. You wonder why Johnson is using his...[otherwise]You try to open the door, but it's locked again." instead.

After opening Johnson's locker:
	try examining the noun.

After closing Johnson's locker:
	say "As soon as you close the locker, the security panel flashes red, locking it once more.";
	now Johnson's locker is locked.


Section - The distress signal

Definition: the distress signal is buttonless if the bloody button is not part of it.

Understand "use [distress signal]" or "activate [distress signal]" as pushing.

Understand "water" as the washbasin when a tap is switched on.

The distress signal can be charged or uncharged.

The description of the distress signal is "An expensive distress signal device you acquired back when you first bought the ship and were a lot more concerned about safety. You should be able to launch this from the airlock and it will send off a high powered signal that can be detected by civilian patrols, military vessels, cruise liners, and basically all the respectable authorities you normally avoid. You don't know what Johnson's been doing with it or why he's painted fire coloured lightning bolts down the sides. [if the bloody button is not part of the distress signal]There should be a simple red button to activate it, but it seems to be missing.".

Instead of putting the bloody button on the distress signal:
	say "The button fits the distress signal -- perfect, a big red button that's exactly what 'devices' need to work properly.";
	now the bloody button is part of the distress signal.

Before printing the name of the buttonless distress signal:
	say "buttonless ".
	
Before printing the name of the charged distress signal:
	say "fully charged ". 
	
Before printing the name of the not buttonless uncharged distress signal when the distress signal has been charged, say "unpowered ".


Section - Powering the distress signal

Understand "[soak] [distress signal] in/using [washbasin]" as inserting it into.

Understand "power up [distress signal] with/using [washbasin]" as inserting it into.

Understand "soak" or "wet" or "dampen" or "immerse" or "moisten" or "submerge" or "souse" or "drench" as "[soak]".

Instead of inserting the distress signal into the flowing water:
	try inserting the distress signal into the washbasin.

Instead of inserting the not buttonless uncharged distress signal into the washbasin:
	if a tap is switched on:
		if the distress signal has been charged:
			say "You dip the distress signal into the washbasin again, recharging it once more.";
		otherwise:
			say "You dip the distress signal into the washbasin slowly until it's completed immersed. You cross your fingers hoping it's not broken down after years of neglect and god knows what Johnson has been doing with it. After a few moments you[if the helmet is worn] see a reassuring glow[otherwise] hear a reassuring beeping noise[end if] and lift it out of the water. The screen now reads 'FULL POWER'.";
		now the distress signal is charged;
		the distress signal runs out of power in 150 turns from now;
	otherwise:
		say "You need to switch a tap on first before that'll do any good."	
	
Instead of inserting the charged distress signal into the washbasin, say "The distress signal is already fully charged.".
	
At the time when the distress signal runs out of power:
	now the distress signal is uncharged.


Section - Launching the distress signal
	
Instead of pushing the buttonless distress signal, say "You can't get the signal working without a nice big red button.".

Instead of pushing the uncharged distress signal, say "You press the button, and after a feeble whizz and clunking noise the screen displays an error message 'LOW POWER'. You sigh at yet another failure then remember why you'd bought this overpriced thing in the first place. It's powered by a micro aqua fusion energy core, you just have to immerse it in water and it'll absorb enough fuel to power itself for several hours. That should just about be long enough.".

Instead of pushing the charged distress signal:
	if the player is in the airlock:
		say launchDistressSignal;
		remove the distress signal from play;
	else if the player is in outer space top:
		say launchDistressSignal;
		remove the distress signal from play;
	else if the player is in outer space middle:
		say launchDistressSignal;
		remove the distress signal from play;
	else if the player is in outer space middle:
		say launchDistressSignal;
		remove the distress signal from play;
	else:
		say "You press the red button again, a loud piercing beep chimes three times and the screen reads 'CANNOT LAUNCH IN ENCLOSED SPACE'.".


To say launchDistressSignal:
	if the player is in the airlock:
		if the outer airlock door is closed:
			say "Launching the distress signal while the outer airlock door is still closed might be tricky.";
	otherwise:
		say "You throw the signaling device out into space unsure exactly what to expect. After drifting slowly away for a few moments its simple navigation thrusters kick in fixing it to a stationary position. It begins to shake in an unnatural manner until suddenly the top of the device explodes open and bright streams of light pour outwards. The device begins to hover back and forward like an excited bee, spreading light patterns across the black emptiness. It takes you a few moments to realise what it's doing. Using what must be some kind of coloured phosphorous liquid it's simulating a firework display. You did NOT expect this. 
		
It takes nearly 5 full minutes for the display to reach it's epic climax in which the words 'JOHNSON RULES' spread out in 50 feet glowing blue light fill your entire vista. All of which confirms your worst fears, that this is why Johnson had the device hidden in his locker. All of the useful signaling apparatus inside the device have been ripped out, as he's been spending his spare time converting it into the spectacle you see before you. 

Seething with rage you try to bury your anger beneath thoughts of what you'll do to Johnson if you ever see him again.".


Section - The security panel and the sci-fi quiz

The sci-fi security panel is part of Johnson's locker.

Understand "use [security panel]" as touching.

Instead of touching or examining the sci-fi security panel: say "[if answer mode has not been true]Oh great, you should have guessed. It was never going to be easy with Johnson. It's a quiz, a classic sci-fi movie quiz. Three questions to open the door. How contrived, how typical of him.[otherwise]Reluctantly, you start the quiz again.";
	change answer mode to True.
	
Instead of touching the sci-fi security panel when Johnson's locker is open, say "You need to close the locker before using the panel again.".

Instead of touching the sci-fi security panel when closed Johnson's locker is unlocked:
	say "[Johnson's locker] is unlocked already and just needs to be opened.".
	
Instead of doing something other than examining the sci-fi security panel:
	try touching the noun.
		
Instead of examining the security panel:
	if johnson's locker is unlocked and johnson's locker is closed:
		say "The panel is lit green and the locker is unlocked.";
	otherwise:
		continue the action.


Section - The sci-fi quiz

The number of correct answers is a number that varies.
The number of questions asked is a number that varies.
Answer mode is a truth state that varies.
Current query is a text that varies.

Guessing is an action applying to one topic.
Understand "[text]" as guessing when answer mode is true.

Check guessing (this is the wrong answer rule):
	if the topic understood is not a topic listed in the Table of Sci-Fi Questions:
		say "[one of]I'm afraid that's the wrong answer![or][Topic understood in sentence case]? No, that's completely wrong.[or][Topic understood in sentence case]? You're way off there, better luck next time.[or]That's the wrong answer.[at random]";
	
Carry out guessing a topic listed in the Table of Sci-Fi Questions:
	if the query entry is the current query:
		increment the number of correct answers by 1;
		say "[comment entry][line break]";
	otherwise:
		say "Ooo, so close. You had the right answer there, but unfortunately to the wrong question. Better luck next time!";
	
Before doing something other than guessing or taking inventory:
	if answer mode is true:
		say "(you ignore the sci-fi quiz)[line break]";
	now answer mode is false;
	reset the quiz.
	
Every turn when the number of questions asked is 3:
	say "[quiz report]".
	
To say quiz report:
	say "You scored [number of correct answers] out of [number of questions asked]. [if the number of correct answers is 0] Your sci-fi knowledge is, quite frankly, pathetic[otherwise if the number of correct answers is 1] You really need to do some boning up on your sci-fi[otherwise if the number of correct answers is 2] So near but yet so far[otherwise if the number of correct answers is 3] Congratulations! You are a bonifide sci-fi geek/sf connoisseur[end if]."
	
Every turn when answer mode is true and the sci-fi security panel is visible:
	if the number of questions asked is 3:
		if the number of correct answers is 3:
			say "The buttons on the security panel start flashing like the lights on a fruit-machine ready to dispense a river of coins. You step back warily. Knowing Johnson you've probably triggered some kind of sci-fi related booby trap. You glance around nervously, expecting to soon be buried underneath an avalanche of Jar-Jar Binks dolls or Manimal memorabilia, but thankfully no sci-fi related ambushes occur. The display on the panel changes to green.[if Johnson's locker has been unlocked]The buttons on the panel flash psychedelically as before, and the locker once more unlocks.[end if]";
			now Johnson's locker is unlocked;
		reset the quiz instead;
	say "[Sci-fi quiz]".
	
To reset the quiz:
	change the answer mode to false;
	now the number of questions asked is 0;
	now the number of correct answers is 0.

To say sci-fi quiz:
	increment the number of questions asked by 1;
	choose a random row in the Table of Sci-Fi Questions;
	say "[fixed letter spacing]Question [number of questions asked] of 3[line break][query entry][variable letter spacing][line break]";
	now current query is query entry;
	now answer mode is true;

Table of Sci-Fi Questions
Query												Topic											Comment
"What is the name of the computer in 2001?"				"[hal]"								"Well done, HAL is correct!"
"Complete this tagline: 'In space no one can hear you _____'"	"scream"										"Don't get too cocky, that question was easy."
"Complete this quote: 'where we're going, you don't need ____ to see'"	"eyes"								"That's the right answer."
"What is the name of the paranoid android?" 				"marvin/radiohead"								"Correct! Bravo!"
"Complete the sequence: '4 8 15 16 23 __'" 					"[fourty two]"						"Correct, how did you know that one?"
"Complete this quote from 'The Matrix': 'There is no ____.'"	"spoon"											"Correct!"
"What is the name of the device that 'makes time travel possible' in Back to the Future?"	"flux capacitor"	"Great work Marty!"
"What's the name of the Chief Security Officer in Star Trek: The Next Generation that meets an unfortunate demise on the planet Vagra II?"	"[Tasha Yar]"		"I can't believe you knew the answer to that one!"
"What is the name of the Swiss painter, famous for his bio-mechanical brush strokes, that designed the monstrous extra-terrestrial life-forms in the film, Alien?"		"HR Giger" or "Giger" or "Hans Ruedi Giger"		"Hans Ruedi Giger it is!"
"What is the name of the sci-fi movie made in 1959 that is simply regarded as one of the worst films of all time?"		"[Plan9]"		"Belissimo!"
"What is the name of the daft computer guiding the crew of 'Red Dwarf' through deep space?"	"Holly"			"Right!"
"What is Red Dwarf's Kryton's favourite television soap?"		"Androids"		"Good guess, that was a tough one."
"What is the name of the restaurant in the Hitch-hiker's Guide to the Galaxy where diners can witness the end of time over and over again?"		"[Milliways]"		"Perfect!"
"What is the average lifespan of a Nexus 6 Replicant?"		"[four years]"		"Great Ridley Scott! That's the correct answer!"
"What race of alien is Invader Zim?"		"Irken"		"How on earth did you know that one?"

Understand "hal" or "hal9000" or "hal 9000" as "[hal]".
Understand "42" or "forty two" or "forty-two" as "[fourty two]".
Understand "Natasha Yar" or "Tasha Yar" as "[Tasha Yar]".
Understand "plan 9" or "plan nine" or "plan9" or "plan 9 from outer space" or "plan nine from outer space" or "plan9 from outer space" as "[Plan9]".
Understand "Milliways" or "The Restaurant at the end of the universe" as "[Milliways]".
Understand "4/four" or "four years" or "4 years" or "4 years old" or "four years old" as "[four years]".
	

Chapter - Crew's Toilets

Section - Location Description

The Crew's Toilets is a room.
The description is "[if the crew's toilets is unvisited and the helmet is worn]If your eyes and sense of the familiar hadn't already informed you that you had entered the Crew toilets, your nose would by now be hammering at the skin of your face, pleading to be let back in and escape the stench of other people's voiding. Admittedly, your nose (along with the skin on the rest of your face) is hermetically inside your helmet and can't smell anything, but you have been blessed with an imaginative nose and by the way the air is swirling thickly, in a fashion not dissimilar to petrol moving through water, you feel compelled to waft your hand about and say 'phew'. 

[end if]To port stand a bank of zero gravity compatible urinals, never a pleasure to use. To the fore are three cubicles. The left cubicle is closed with the words 'OUT OF ORDURE' scrawled on the door. The centre door is open, inside the toilet lid is up and the bowl has been stuffed with toilet tissue. The cleaning nozzle is running constantly causing streamers of tissue to waft in the air like the arms of an indolent paper octopus. There is no right door, inside the bowl has been removed and the coupling has been capped. Only the best for your crew.

Fixed to the starboard wall are two tarnished metal sinks, each with an antique mirror. The fittings are supposed to be retro and match those from an InterCity 125, which was apparently a type of train. The words 'WEST HAM' and 'SKINS' and a rudimentary drawing of a penis have been etched into the mirror surface. You suspect the penis is a new addition by Johnson. Aft is the advertising panel you were paid to install. It's currently offering crew members [random advert]".

Instead of exiting in the Crew's Toilets when the holder of the player is the Crew's Toilets:
	try going starboard.

The Crew's Toilets door is a doorway. 
The Crew's Toilets door is port of the Middle Deck Aft Corridor and starboard of the Crew's Toilets. 

Instead of going fore from the Crew's Toilets, say "You step towards the cubicles. The paper octopus flutters at you. There is some discolouration. You back away.".


Instead of going port from the Crew's Toilets, say "You turn towards the zero gravity urinals and shudder. You promised yourself never again, and it's a promise you intend to keep.".

Instead of going up from the Crew's Toilets, say "You look up at the ceiling tiles. One of them has been moved. Looks like it's concealing some of Hudson's magazines.".

Instead of going down from the Crew's Toilets, say "The deep lustre of the polished white marble stretched for yards in all direction- sorry, that's the wrong bathroom. You are standing on dirty grey linoleum.".


Section - Random Advert

To say random advert:
	say "[one of]A 'hefty discount!' on an ex-fleet UPS system that knows where all the speedtraps and cameras are. [or]A yellow star shape which contains the legend, 'Now includes Crab Nebula and Birmingham!'[at random]".
	
The advertising panel is scenery in the Crew's Toilets. The description is "[random advert]".


Section - Urinals

Some urinals are scenery in the Crew's Toilets. The description is "Looking at the urinals makes you mightily glad that you've got your own en-suite bathroom."

Understand "urinal" or "bank of urinals" or "zero gravity urinals" or "bank of zero gravity urinals" as the urinals.

Instead of using the urinals, say "You don't need to go yet. In any case, your spacesuit can cope."


Section - Cubicles

A cubicle is a kind of container. It is scenery and openable.

Understand "cubicles" as a cubicle. 

Instead of entering a cubicle, say "There's no way that you ever going to set foot in there. No way hose[if a random chance of one in 2 succeeds]. Not while you've got your own en-suite bathroom[end if]."

The left cubicle is a cubicle in the Crew's Toilets. It is closed.

Instead of opening the left cubicle, say "The door says it's out of order and you believe it."

The description is "It appears to be out of order." 

Understand "left door" or "left cubicle door"  or "out of ordure" as the left cubicle.

The middle cubicle is a cubicle in the Crew's Toilets. The description is "[if the middle cubicle is open]This cubicle hasn't got 'out of ordure' written on it, but it appears to be so.[otherwise]It's closed."

Understand "centre door" or "toilet lid" as the middle cubicle.

The right cubicle is a cubicle in the Crew's Toilets.

Understand "right door" or "bowl" as the right cubicle. The description is "This is in worse shape than the other two cubicles."

A cleaning nozzle is scenery in the Crew's Toilets.

Some streamers of tissue are scenery in the Crew's Toilets.

The coupling is scenery in the Crew's Toilets.


Section - Tarnished Sinks

Some tarnished sinks are scenery in the Crew's Toilets. The description is "The sinks are dirty and the taps are missing. Flecks of spittle across the surface of the mirror remind you of happier times."

Some antique mirrors are part of the tarnished sinks.

Understand "mirror" or "antique mirror" as the antique mirrors.

Instead of using the sinks, say "The taps are missing and the sinks appear unusable -- so this is why the crew are always complaining about the bathroom facilities."


Section - Rudimentary drawing of a penis

A rudimentary drawing of a penis is scenery in the Crew's Toilets. The description is "You see nothing special about the rudimentary drawing of a penis -- well, nothing that you haven't seen a hundred times before on your visits to a public toilets."


Chapter - Escape Pod 

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Escape_Pod

]

Section - Location Description

The Escape Pod Room is a room. The printed name of the escape pod room is the "The Escape pod".
The description is "[if unvisited]Whilst definitely an Escape Pod, you can't help but feel the designers may have misunderstood their brief. This is not a pod you would like to escape in, but one you might be very eager to escape from.

[end if]The pod is a coffin shaped box (entered by sliding in from the wide end) that fits your body like a clammy, infrequently cleaned glove. [if the helmet is worn]There is usually a distinct odor of rotting rodent, but fortunately you can't smell it through your helmet.[otherwise]There is a distinct odor of rotting rodent, but fortunately you can't move enough to trace it's source.[end if]

The only light comes from a panel of brightly lit multi-coloured buttons, knobs, and switches directly in front of your face. [if unvisited]As you can hardly move your arms you might to have to manipulate them with your face. Judging by the look of them you may be the 100th person to do this.[end if]".

The escape pod room door is a doorway. 
The escape pod room door is aft of the Middle Deck Aft Corridor and fore of the Escape Pod Room. 
The escape pod room door is manual.
The escape pod room door is openable. The escape pod room door can be sealed. The escape pod room door is not sealed.

Before going through the closed escape pod room door:
	say "(first opening the escape pod door)";
	silently try opening the escape pod room door.
	
Before going to the escape pod room for the first time:
	say "Looking at the Escape Pod you have second thoughts.
Then you are distracted by a third and more arousing thought, so you slip into the Pod.".

Instead of going aft in the escape pod room,
	say "You move slightly down the Pod. All this does is move you closer to the foul stench of rodent.
Your only Escape is to slide out of the fore end of the Pod.".

Instead of going port in the escape pod room,
	say "You try, but are unable to move in the Pod's rancid embrace.
Your only Escape is to slide out of the fore end of the Pod.".

Instead of going starboard in the escape pod room,
	say "You wriggle. Unfortunately you are still in the Pod.
Your only Escape is to slide out of the fore end of the Pod.".

Instead of going up in the escape pod room,
	say "You are lying on your back in a coffin shaped Escape Pod. There is no where to go.
Your only Escape is to slide out of the fore end of the Pod.".

Instead of going down in the escape pod room,
	say "You lie down harder.
Your only Escape is to slide out of the fore end of the Pod.".

Instead of exiting in the Escape Pod Room when the holder of the player is the Escape Pod Room:
	try going fore.

Before going fore in the escape pod room:
	if podLaunchStage is pod-mauve:
		change podLaunchStage to pod-debug;
	otherwise if podLaunchStage is pod-alert:
		say "You get out of the life pod to escape the sprinkler and those piercing alarm sounds.
Behind you the door seals shut unexpectedly.

You peer through the porthole, inside the barmy computer has one last message for you 'FIRE IN LIFE POD DEEMED DANGER TO SHIP, EJECTING LIFE POD' and with that it fires it's engines and shoots off into space without you. Brilliant.

As the life pod rockets away leaving you to your possible doom you don't really feel regret.
Even if you'd somehow gotten away in it you do wonder exactly what other ridiculous routines and procedures it would expect you to go through once you were out there waiting for rescue.";
		move the player to the middle deck aft corridor, without printing a room description;
		now the escape pod room door is closed;
		now the escape pod room door is sealed;
		stop the action;
	otherwise:
		say "You slide your way out of the fore end of the Pod.".
	
Before going through the sealed escape pod room door:
	say "The entrance to the escape pod has been sealed off. Which is probably for the best considering the escape pod is long gone." instead.	
	
Understand "escape" as a mistake("You're going to have to be more specific on how to activate the escape pod than that.") when the player is in the escape pod room.
	
Does the player mean doing something other than opening the escape pod room door: it is unlikely.


Section - Escape Pod Panel

The escape pod panel is a prop in the escape pod room.
The description is "There is a monitor and a panel full of brightly coloured switches, dials and knobs. Most noticeably is a big friendly red button marked launch.

[if podLaunchStage is not pod-dead]The monitor currently shows the following message:
[otherwise]The monitor is currently blank.[end if]
[escape pod status]".

Understand "control panel" or "panel" or "monitor" or "pod panel" or "controls" or "buttons" or "switched" or "dials " or "knobs" as the escape pod panel.

Instead of exiting in the Escape Pod Room when the holder of the player is the Escape Pod Room:
	try going fore.

The fake switches is a prop in the escape pod room. It is privately-named. The description is "There are so many that, at the moment, you don't know which one examine."

Understand "switches" or "switch" as the fake switches.

Every turn when the podLaunchStage is pod-yellow2:
	remove the fake switches from play.

Rule for clarifying the parser's choice of the fake switches:
	say "(The many, many switches.)".
	

Section - Escape Pod Status

The launchStage is a kind of value.
The launchStages are pod-dead, pod-red1, pod-red2, pod-debug, pod-blue1, pod-blue2, pod-lilac, pod-mauve, pod-yellow1, pod-yellow2, pod-red3, pod-alert.
The podLaunchStage is a launchStage which varies.
When play begins, change podLaunchStage to pod-dead.

To say escape pod status:
	if podLaunchStage is pod-red1:
		say "Are you absolutely sure? There may be no going back. (Repeat command if you're sure). ";
	otherwise if podLaunchStage is pod-red2:
		say "CANNOT LAUNCH ESCAPE POD AT THIS TIME. 
For full details please enable debug switch. ";
	otherwise if podLaunchStage is pod-debug:
		say "Unable to launch escape pod until one of the following two conditions is met:
(1) Bridge has not issued state of emergency ([if the blue-pod button is not switched on]Press Blue to fix this[otherwise] Fixed[end if]).
(2) Ship monitor does not report any serious dangers ([if the yellow-pod button is not switched on]Press Yellow to fix this)[otherwise]Fixed. ";
	otherwise if podLaunchStage is pod-blue1:
		say "Your request for a state of emergency has been sent to the bridge.
The bridge staff will respond as soon as possible. ";
	otherwise if podLaunchStage is pod-blue2:
		say "A request has already been sent to the bridge.
If you have command clearance you can issue a state of emergency using the Lilac Dial. ";
	otherwise if podLaunchStage is pod-lilac:
		say "OVERRIDE EMERGENCY STATUS - PLEASE LOOK INTO MAUVE IRIS SCANNER FOR COMMAND AUTHORISATION. ";
	otherwise if podLaunchStage is pod-mauve:
		say "UNATHUORISED EMERGENCY STATUS OVERRIDE. CONTACT CAPTAIN MATTHEWS FOR PROPER CLEARANCE. PLEASE EXIT LIFE POD. ";
	otherwise if podLaunchStage is pod-yellow1:
		say "Ship status monitors: no response.
This has been reported to the ship's maintenance team and will be included in their next inspection. ";
	otherwise if podLaunchStage is pod-yellow2:
		say "Ship status monitors: no response.
A maintenance request has already been filed to activate the status monitor in this life pod please enter the coloured override sequence from the ship's status monitor unit using the switches below.

Below the display screen are 4 coloured switches: green, orange, purple and red. ";
	otherwise if podLaunchStage is pod-red3:
		say "Ship's status monitor: Still no response.
Life pod status monitor: detect no problems. ";
	otherwise if podLaunchStage is pod-alert:
		say "WARNING FIRE IN LIFE POD, PLEASE EXIT LIFE POD NOW. ".


Section - Escape Pod Panel Controls

The red-pod button is a device.  The printed name of the red-pod button is "red launch button". Understand "red" as the red-pod button.
Understand "red button" or "launch button" or "red button marked launch" or "button marked launch"as red-pod button.
The red-pod button is part of the escape pod panel.

Does the player mean doing something with the red-pod button:
	if the podLaunchStage is pod-red1 or the podLaunchStage is pod-red2 or the podLaunchStage is pod-dead:
		it is likely.
		
Does the player mean doing something with the blue-pod button: it is unlikely.

The debug-pod switch is a device.
Understand "debug switch" or "debug" as debug-pod switch.
The debug-pod switch is part of the escape pod panel.

The blue-pod button is a device.  The printed name of the blue-pod button is "blue button". Understand "blue" as the blue-pod button.
Understand "blue button" as blue-pod button.
The blue-pod button is part of the escape pod panel.

The description of the blue-pod button is "This button is used to issue a state of emergency on the bridge."

The lilac-pod dial is a device.
Understand "lilac dial" or "lilac" as lilac-pod dial.
The lilac-pod dial is part of the escape pod panel.
Understand "turn [lilac-pod dial]" as switching on.

The mauve iris scanner is a thing.
Understand "iris scanner" or "scanner" or "mauve scanner" as mauve iris scanner.
The mauve iris scanner is part of the escape pod panel.

The yellow-pod button is a device. The printed name of the yellow-pod button is "yellow button". Understand "yellow" as the yellow-pod button.
Understand "yellow button" as yellow-pod button.
The yellow-pod button is part of the escape pod panel.

The description of the yellow-pod button is "This button is used to detect any problems with the ship status monitor." 

A coloured-switch is a kind of device. Understand "switches" as a coloured-switch when the fake switches are off-stage.

The purple-pod switch is a coloured-switch. The printed name of the purple-pod switch is "purple switch".
Understand "purple switch" as purple-pod switch.
The purple-pod switch is part of the escape pod panel.

The orange-pod switch is a coloured-switch. The printed name of the orange-pod switch is "orange switch".
Understand "orange switch" as orange-pod switch.
The orange-pod switch is part of the escape pod panel.

The green-pod switch is a coloured-switch. The printed name of the green-pod switch is "green switch".
Understand "green switch" as green-pod switch.
The green-pod switch is part of the escape pod panel.

The red-pod switch is a coloured-switch. The printed name of the red-pod switch is "red switch".
Understand "red switch" as red-pod switch.
The red-pod switch is part of the escape pod panel.


Section - Escape Pod - Red Button

Does the player mean doing something with the red-pod button when podLaunchStage is pod-yellow2: it is unlikely.

Instead of switching on red-pod button for the first time:
	say "The main display flashes the message: Are you absolutely sure? There may be no going back. (Repeat command if you're sure).";
	change podLaunchStage to pod-red1.

Instead of switching on red-pod button for the second time:
	say "You flinch as you smack your palm down on the red button, preparing for the jarring release from the ship.
However despite a cacophony of activity on the many displays now buzzing with life, no actual movement occurs.
Eventually the main display buzzes at you displaying the message:
'CANNOT LAUNCH ESCAPE POD AT THIS TIME. For full details please enable debug switch.'

Brilliant! What now? This is all you need.";
	silently try switching on red-pod button;
	change podLaunchStage to pod-red2.

Instead of switching off red-pod button:
	say "No matter how many times you press the button...nothing happens."


Section - Escape Pod - Debug Switch

The printed name of the debug-pod switch is "debug switch".

Understand "enable [debug-pod switch]" as switching on.

Before switching on debug-pod switch:
	if podLaunchStage is not pod-red2:
		say "The switch flicks back to its original position and nothing happens.";
		stop the action;

Instead of switching on debug-pod switch for the first time:
	say "You scan the rack of controls until you find a simple flip switch with a worn away label reading 'EBUG', this has to be it you think as you flip it to what you hope is the on position.
The display panel changes to show a new read out: 

Unable to launch escape pod until the following conditions have been met:

(1) Bridge has not issued state of emergency (Press Blue to fix this).

(2) Ship monitor does not report any serious dangers (Press Yellow to fix this).";
	silently try switching on debug-pod switch;
	change podLaunchStage to pod-debug.

Instead of switching off debug-pod switch:
	say "The debug switch is now locked in place.".


Section - Escape Pod - Blue Button

Before switching on blue-pod button:
	if podLaunchStage is not pod-debug and podLaunchStage is not pod-blue1:
		say "You press the blue button but nothing appears to happen.";
		stop the action.	

Instead of switching on blue-pod button for the first time:
	say "You press the blue button and the display returns the message:
'Your request for a state of emergency has been sent to the bridge.
The bridge staff will respond as soon as possible. If this hasn't solved your problem, please press blue for further assistance.'

You sigh at the thought of an empty bridge ignoring your plea for help.";
	change podLaunchStage to pod-blue1.

Instead of switching on blue-pod button for the second time:
	say "You press the blue button again hoping your repetition will impress a sense of urgency upon the system, it comes back with the message:
'A request has already been sent to the bridge. If you have command clearance you can issue a state of emergency using the Lilac Dial.'.";
	silently try switching on blue-pod button;
	change podLaunchStage to pod-blue2.
	
Instead of switching on the switched on blue-pod button:
	say "You're not going through that nonsense again."
	

Instead of switching off blue-pod button:
	say "No matter how many times you press the button...nothing happens."


Section - Escape Pod - Lilac Dial

Understand "look into [mauve iris scanner]" as using.

Before switching on lilac-pod dial:
	if podLaunchStage is not pod-blue2:
		say "As hard as you try the lilac dial just won't move.";
		stop the action.

Instead of switching on the lilac-pod dial for the first time:
	say "It takes you a while to find the Lilac dial amidst the myriad of bewildering controls but this one seems to have two settings SAFE and PROBLEMS.
Currently set to SAFE you do the only logical thing and set it to PROBLEMS.

The screen once again flashes to life with a new message:
'OVERRIDE EMERGENCY STATUS - PLEASE LOOK INTO MAUVE IRIS SCANNER FOR COMMAND AUTHORISATION'.";
	silently try switching on lilac-pod dial;
	change podLaunchStage to pod-lilac.

Instead of switching off lilac-pod dial:
	say "The dial won't budge."


Section - Escape Pod - Mauve Iris Scanner

Before using mauve iris scanner:
	if podLaunchStage is not pod-lilac:
		say "You position your helmet over the scanner but nothing happens.";
		stop the action.

exitLifePodWarning is a truth state that varies. exitLifePodWarning is false.

Instead of using mauve iris scanner:
	say "You position your helmet over the scanner and a bright light flashes in your eyes causing more than a little discomfort.
After a few seconds sirens begin to sound and a red warning message flashes up:
'UNAUTHUORISED EMERGENCY STATUS OVERRIDE. CONTACT CAPTAIN MATTHEWS FOR PROPER CLEARANCE. [bold type]PLEASE EXIT LIFE POD[roman type]'

Oh shit you realise, Matthews was the guy you bought the ship from.
Clearly you've never reset the life pod command settings.";
	change exitLifePodWarning to True;
	change podLaunchStage to pod-mauve.
	
Every turn when exitLifePodWarning is True and the turn count is even:
	say "[bold type]'WARNING! PLEASE EXIT!'[line break][roman type]".
		
Carry out going when exitLifePodWarning is True:
	now exitLifePodWarning is False.
	
Instead of examining the mauve iris scanner:
	try using the mauve iris scanner.


Section - Escape Pod - Yellow Button

Before switching on yellow-pod button:
	if podLaunchStage is not pod-debug and podLaunchStage is not pod-yellow1:
		say "You punch the yellow button but nothing obvious happens.";
		stop the action.

Instead of switching on yellow-pod button for the first time:
	say "You press the yellow button and the display returns the message:
'Ship status monitors: [if the functional fuse is in the fore fusebox] Warning: Power surge detected. [otherwise] no response. [end if]
This has been reported to the ship's maintenance team and will be included in their next inspection. If this hasn't solved your problem, please press yellow for further assistance.'

Well that would be great were your maintenance guy not on leave for the next few weeks.";
	change podLaunchStage to pod-yellow1.

Instead of switching on yellow-pod button for the second time:
	say "Despite the display's warnings, you press the yellow button yet again, hoping for a more favourable result the second time around.

A new message is fed back to you:
'A maintenance request has already been filed to activate the status monitor in this life pod. Please enter the coloured override sequence from the captain's quarters status monitor unit using the switches below.'.

Below the display screen are 4 coloured switches: green, orange, purple and red.";
	silently try switching on yellow-pod button;
	change podLaunchStage to pod-yellow2.

Instead of switching off yellow-pod button:
	say "Nothing happens when you press the yellow button again.".


Section - Escape Pod - Coloured Switches

Does the player mean doing something with a coloured-switch when podLaunchStage is not pod-yellow2: it is unlikely.

The printed name of the green-pod switch is "green switch".

Before switching on green-pod switch:
	if podLaunchStage is not pod-yellow2:
		say "The green switch won't budge at the moment.";
		stop the action.
		
Understand "green" as the green-pod switch.

The printed name of the orange-pod switch is "orange switch".

Before switching on orange-pod switch:
	if podLaunchStage is not pod-yellow2:
		say "The orange switch won't budge at the moment.";
		stop the action.
		
Understand "orange" as the orange-pod switch.

Understand "purple" as the purple-pod switch.

Before switching on purple-pod switch:
	if podLaunchStage is not pod-yellow2:
		say "The purple switch won't budge at the moment.";
		stop the action.

Understand "red" as the red-pod switch.

The printed name of the red-pod switch is "red switch".

Before switching on red-pod switch:
	if podLaunchStage is not pod-yellow2:
		say "The red switch won't budge at the moment.";
		stop the action.

Instead of switching off a coloured-switch when buttonsFlicked is not 4:
	say "The override switches lock in place once switched on.".

The purplePosition is a number variable. The purplePosition is 0.
The orangePosition is a number variable. The orangePosition is 0.
The greenPosition is a number variable. The greenPosition is 0.
The redPosition is a number variable. The redPosition is 0.
The buttonsFlicked is a number variable. The buttonsFlicked is 0.

After switching on the purple-pod switch:
	say "The purple switch flicks into place.";
	change buttonsFlicked to buttonsFlicked + 1;
	change purplePosition to buttonsFlicked.

After switching on the orange-pod switch:
	say "The orange switch flicks into place.";
	change buttonsFlicked to buttonsFlicked + 1;
	change orangePosition to buttonsFlicked.

After switching on the green-pod switch:
	say "The green switch flicks into place.";
	change buttonsFlicked to buttonsFlicked + 1;
	change greenPosition to buttonsFlicked.

After switching on the red-pod switch:
	say "The red switch flicks into place.";
	change buttonsFlicked to buttonsFlicked + 1;
	change redPosition to buttonsFlicked.

Every turn:
	if all coloured-switchs are switched on and the player is in the escape pod room:
		if purplePosition is 1 and orangePosition is 2 and greenPosition is 3 and redPosition is 4:
			say "A confirmation beep sounds from the control panel accompanied by a message:
'Life pod status monitor: no fire detected inside the escape pod. WARNING. NO FIRE DETECTED!!!'

ARGHHHH! You scream inside, of course it doesn't detect a fire, there isn't one. What use was this?";
			silently try switching off purple-pod switch;
			silently try switching off orange-pod switch;
			silently try switching off green-pod switch;
			silently try switching off red-pod switch;
			change podLaunchStage to pod-red3;
			change buttonsFlicked to 0;
		otherwise:
			say "[reset override]";
			silently try switching off purple-pod switch;
			silently try switching off orange-pod switch;
			silently try switching off green-pod switch;
			silently try switching off red-pod switch;
			change buttonsFlicked to 0.

To say reset override:
	say "The display flashes: INCORRECT OVERRIDE CODE!!!!.

All four switches snap back to their start positions.".


Section - Escape Pod - Use Of Lighter

Instead of switching on the lighter:
	if player is in the escape pod room:
		say "You ignite the lighter inside the escape pod, hoping the status monitor will detect a fire and allow you to launch this insufferable device.
It sort of works. Sirens begin flashing and a sprinkler system douses you in water.

Warning messages on the display show:
'WARNING FIRE IN LIFE POD, PLEASE EXIT LIFE POD NOW'.";
		change podLaunchStage to pod-alert;
	otherwise:
		say "You don't want to do that here because the fire suppression system will kick in -- then you'd [italic type]really[roman type] be in trouble.".


Chapter - Kitchen

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Kitchen

]

Section - Location Description

The Kitchen is a room.
The description is "The dingy kitchen is approximately 3 by 4 metres wide, and would be cozy when your chef and weapons officer Josh Hudson is in here mixing up the latest batch of mush for you all to suffer through, but it's nice and roomy when you're on your own. It looks like it was decorated circa 1984, with unattractive korma-coloured cupboard doors and faux tile lino on the floor. On the aft wall is an oven and a bank of head height cupboards with a wildly marked worktop underneath. Halfway down, the pantry door hangs off its hinges. You can see vermin footprints in some flour that's fallen off one of the pantry shelves.

Lining the worktop are various industrial appliances that look like they've not seen a wash in several light years; which is strange, as the sink is less than a metre away. In the middle of room is a worktop island, and on the starboard side of the room, the bin, next to the refrigerator, overfloweth.

An old microwave is on the worktop.[if the tray is on the worktop]

On the worktop island in the middle of the room are the leftovers from your last stir fry fix sitting on a dirty kitchen tray.[end if]".

Instead of exiting in the kitchen when the holder of the player is the Kitchen:
	try going starboard.


Section - The kitchen door

The kitchen door is a doorway. It is privately-named. Understand "kitchen door" as the kitchen door.

The kitchen door is starboard of the Middle Deck Aft Corridor and port of the Kitchen.

Instead of rubbing the kitchen door, say "You squeamishly push part of the foodstuff with the tip of your little finger to reveal the message underneath, it says 'No food fights in the Canteen'.".

Rule for writing a paragraph about the closed kitchen door:
	if the location is the kitchen:
		set the locale priority of the canteen door to 1;
		say "A health and safety notice hangs on door, partially-obscured by some kind of fossilised foodstuff, smeared across it during a particularly gloopy food fight.";
	otherwise:
		set the locale priority of the canteen door to 0;


Section - Vermin

Instead of going aft from the kitchen:
	if vermin is in the pantry:
		say "There's nothing this way but scurrying sounds coming from the pantry shelves. ";
	otherwise:
		say "There's nothing this way but you notice that the scurrying sounds have stopped. ".

Instead of going nowhere from the kitchen, say "You can't leave that way. You can see the picnic tables of the canteen through the fore door, and the middle deck aft corridor through the door to the port.".


Section - Kitchen Worktop

The kitchen worktop is a scenery supporter in the kitchen. It is privately-named. 

The description is "Like most of the kitchen the worktop is a true testament to a chef determined to leave some permanent remnant of every meal he's cooked over every floor and surface. The last inspector who went through your ship nearly vomited when he saw this worktop and you had to fork over a rather cherished bottle of single malt to get him to clear your ship. You'd love to speak to Hudson about his kitchen hygiene but you like your internal organs to stay internal for as long as possible.".

Understand "kitchen worktop" or "wildly marked worktop" or "marked worktop" or "worktop" as kitchen worktop.

[>>> worktop island]
The kitchen worktop island is a scenery supporter in the kitchen. It is privately-named. Understand "worktop island" or "island" or "kitchen worktop island" as the kitchen worktop island.

The description is "The island is unspectacular in its functional nature. It attempts to hold things above the ground in a reasonably horizontal manner and you know what, it does it well!".


Section - Kitchen Tray

The kitchen tray is an open container on the worktop. The kitchen tray can be curved. The kitchen tray can be gluey. The description of the kitchen tray is "[if the kitchen is not curved]One of the Chef's baking trays. You think it looks strangely flat for an oven tray until you realise it's a sheet of pure titanium. Why would he need titanium for cooking with, that's a rather expensive degree of overkill. Still Hudson has never been the most rational member of the crew.[otherwise]This is the curved tray, ready to be put on the fuel line.[end if][if the kitchen is gluey] The tray is covered in glue."

The printed name of the Kitchen Tray is "titanium kitchen tray".

Before printing the name of the curved Kitchen tray, say "curved ".

Instead of examining the kitchen when the tray is part of the leaky fuel line:
	say "The tray is stuck in place, doing it's job nicely."
	
Understand "tray" or "titanium" as kitchen tray.

Before taking the kitchen tray, say "You dump the leftovers in the bin and 'borrow' Chef's titanium tray, thinking it might be helpful in your repairs. You better find a replacement if and when you get back as you don't fancy an angry visit from him when he spots it's missing.".

[>>> leftovers]
The stir-fry is on the kitchen worktop.

Understand "leftover" as the leftovers.

The description is "These are the leftovers from that batch of bell peppers and beef stir-fry that Hudson prepared for you before the crew went on holiday. He loves to make batches of food, even when only serving a single person. For breakfast, you usually get a large batch of porridge, lunch normally consists of a batch of macaroni casserole, for dinner you are served a batch of lumpy mash with parsnip chunks, and for supper a batch of batchelors curried noodle soup is always forthcoming. No wonder the bin is overflowing.".

Understand "noodles" or "leftovers" as stir-fry.

Instead of taking the stir-fry, try taking kitchen tray.

Section  - Ways to not panel beat the kitchen tray

Instead of bending the kitchen tray:
	say "You try bending the tray with your bare hands,  but soon give up. To make a dint in this your going to need a tool."

Understand "curve [kitchen tray]" or "shape [kitchen tray]" as bending.

Instead of using something on the kitchen tray:
	try hitting the kitchen tray with the noun.

Instead of hitting the kitchen tray with the pliers:
	say "You try to bend the [kitchen tray] with the pliers, don't make any great progress. You need something weighter."

The broken shovel is a thing. The description is "This shovel ain't going to be seeing any more aerating action. "

Instead of hitting the kitchen tray with the small shovel:
	say "This should work. You crack the [kitchen tray] as hard as you can with the shovel. SNAP! God, No!!! The shovel has snapped in half, and there is a big splinter down the center of its head , rendering it quite useless. This really is a tough tray. Looks like only a heavy duty hammer would be able to dent it.";
	remove the small shovel from play;
	now the player has the broken shovel. 

Instead of hitting the kitchen tray with the whisk:
	say "You turn the whisk furiously,  but as soon as it touches the tray it comes flying out of your hand. Methinks you can't apply the principles of egg beating to panel beating.";
	now the whisk is in the location of the player. 

Instead of hitting the kitchen tray with the statue:
	say "The statue is simply too small for that. Anyway, you don't want to anger Zod."







Section - Appliances

The appliances are on the worktop.
The appliances are scenery.
The description is "A myriad of appliances clutter the top of the worktop here, including a sky blue blender, a triple slice toaster, and an electronic scales. ".

Understand "blender" or "triple slice toaster" or "toaster" or "electronic scales" or "scales" or "sky blue blender" as appliances.

Instead of doing something other than examining the appliances, say "There's no time for cooking.".

[>>> oven]

The oven is a closed openable scenery container in the kitchen.
The description is "A futuristic vision in stainless steel, the oven combines retro 1950s styling with a functionality delivered by space-travel age materials. The oven looks as if it has enough capacity with it's twelve hobs and three large chambers to cook for the crew of a cargo vessel such as yours, though in truth most crew members prefer vending machine snacks and microwaveable ready-meals.".

Understand "stove" or "range" as the oven.

The hob is a device. It is part of the oven.
After switching on the hob, say "The hot plate begins to glow instantly.".
After switching off the hob, say "The glow from the hot plate slowly begins to fade.".

Instead of putting something on the hob, say "Now's no time for cooking."

Instead of switching on or opening the oven, say "Now is not the time to be practicing your culinary skills.".

[>>> microwave]

Definition: a container is empty if it contains nothing.

Understand "microwave oven" as microwave.

The microwave is on the kitchen worktop. It is an closed fixed in place openable transparent container. 

The description of the microwave is "[if closed]A small black box with a large window on the front, vents on top, digital display, spectacularly named chaos defrost setting and a satisfying ping. Invaluable after a hard day of work when you just can't be bothered.[end if][if open]It's open, and ready to heat up any snacks.[end if]"
	
Instead of using the microwave:
	try switching on the microwave.

Before switching on the microwave when the microwave is open:
	say "(first closing the microwave)[command clarification break]".
	
Instead of switching on the microwave when the microwave is empty:
	say "There's nothing inside to heat up."
	
Instead of switching on the microwave when something that is not the space putty is in the microwave:
	say "Microwaving the [random thing inside the microwave] would have disastrous consequences."
	
Instead of inserting something into the microwave when something is in the microwave:
	say "There's not enough room for that as well as the [a random thing in the microwave]".

Before inserting something into the closed microwave:
	say "(first opening the [microwave])[command clarification break]";	
	silently try opening the microwave.

Before taking something which is in the closed microwave:
	say "(first opening the [microwave])";
	silently try opening the microwave.
	
Instead of switching on the microwave when the space putty is in the microwave:
	if the space putty is gloopy:
		say "The space putty has already been melted, there's no need keep heating it.";
	otherwise:
		say "You switch the microwave on to its maximum setting and the block of putty begins slowly turning inside the device. Thankfully it looks like the microwave uses the right kind of radiation as the block begins to melt into a gloop like substance. Once the microwave has finished you quickly take the gloop as you figure you don't have long before this sets back into a solid chunk.";
		silently try taking the space putty;
		now the space putty is gloopy;
		the space putty hardens in 10 turns from now.
		
Instead of waiting when the space putty is in the mould:
	if the mould is carried:
		say "[one of]Come on, set, damn you....SET![or]You wait nervously while the space putty sets. If this doesn't work, you'll never repair the engines.[or]You wait impatiently.[or]You wait, willing the space putty to set perfectly.[or]You can't stand waiting, you feel so powerless.[at random]";
	otherwise:
		continue the action.
		
At the time when the space putty hardens:
	if the space putty is not in the mould:
		if the space putty is visible:
			say "The space putty has seems to have solidified again.";
		now the space putty is not gloopy;
	otherwise:
		if the space putty is visible:
			say "The space putty should hopefully have set in the mould by now.";
		remove the space putty from play;
		move the replacement starter nozzle to the mould.


Section - Replacement Starter Nozzle
		
The replacement starter nozzle is a thing. 

Instead of opening the mould when the replacement starter nozzle is in the mould:
	say "You carefully pry open the two mould pieces and inside find what looks like a perfectly workable engine starter nozzle.";
	move the replacement starter nozzle to the player.
	
Instead of doing something other than examining or opening or pulling the mould when the replacement starter nozzle is in the mould:
	say "You just need to open the mould now and hope for the best."
	
Instead of pulling the mould when the replacement starter nozzle is in the mould:
	try opening the mould.

[>>> refrigerator]
The refrigerator is a closed openable container in the kitchen.
The refrigerator is scenery.
The description is "[if closed]The refrigerator, shiny, silver and boxy, as tradition dictates. Cold storage for all the lovely food you and your crew like to eat.[end if][if open]The lack of light inside tells of another victim of power-loss. Still, you can make out one jar of pesto, a tomato so ancient it actually qualifies for free travel on the ship, and the final bottle of beer on the ship.[end if]".

A jar of pesto is in the refrigerator.
The description is "A jar of wondrous pesto, bestest food in the universe. Either half-full, or half empty.".
Understand "jar" or "pesto" or "pesto jar" as jar of pesto.
Instead of taking jar of pesto, say "It may be the bestest food in the universe, but it's not of much use right now.".

A tomato is in the refrigerator.
The description is "You're not sure, but you feel that this tomato predates space travel itself.".
Instead of taking tomato, say "You're not sure, but you feel that this tomato predates space travel itself. Best leave it.". 

Understand "tomatoe" as the tomato.

A bottle of beer is in the refrigerator.
The description is "The last bottle of Leopard Lager anywhere on the ship.".
Understand "bottle" or "beer" or "beer bottle" as bottle of beer.
Instead of taking beer, say "You're saving it for a special occasion, like rejoining civilisation.".

[>>> bin]
The bin is a prop in the kitchen.
The description is "It's one of those foot operated bins; foot goes down, lid goes up, foot goes up, lid goes down. At least, that's how it would work if it wasn't currently overflowing with trash, forcing the lid permanently open. It's silver plated and shaped like a bullet; you could well imagine loading it into the torpedo chamber and firing it at a colossal space werewolf.".

Understand "trash" or "trash can" or "garbage" as bin.

Instead of emptying bin, say "You're proud of your record of never having emptied a bin in your lifetime, and now's certainly not the time to break that record.".

Instead of taking bin, say "Thankfully, to your knowledge there's no such thing as a space werewolf, so there's no need to carry this around with you.".

Instead of searching the bin, say "You take a quick peek inside, but stop short of having a rummage about -- it's simply too gross." 


Section - Faux Tile Lino (floor)

The faux tile lino is a prop in the kitchen.
The description is "The more you look at the kitchen floor the more you wish you hadn't. To call it stained doesn't really do justice to the baffling array of multi-coloured patterns constructed from what at one point must have been called food. While most of it has long been ground into a solid mass that will never come up, some of the fresher parts stick to the bottom of your boots as you carefully move through the small room.".

Understand "faux" or "lino" or "floor" as faux tile lino.


Section - Kitchen Cupboard

The kitchen cupboard is a closed scenery openable container in the kitchen.
The description is "[if closed]An unattractive korma coloured cupboard.[end if][if open]Inside are a discordant array of cups, bowls, saucers, and dishes.[cookbook in cupboard][end if]".

To say cookbook in cupboard:
	if cookbook is in the cupboard, say " A cookery book is propped up on one side of the cupboard.".

Understand "cupboard" or "cupboards" or "korma" or "korma coloured" or "korma coloured cupboard"  or "cupboard doors" as kitchen cupboard.

Instead of taking the kitchen cupboard, say "Even if the cupboard wasn't fixed in place, you would never take something that hideous.".

Instead of attacking the kitchen cupboard, say "You're completely justified in wanting to obliterate such a ghastly piece of work, but now's not the time. Maybe later.".

[>>> cookbook]
A cookbook is in the kitchen cupboard.
The description is "Cooking on a budget for the crew of an intergalactic cargo freighter for dummies volume 1. The book has been well used, the stains Hudson has left on each page act as a historical record of his culinary experimentation in the name of cabbage soup perfection.".

Understand "cook book" or "recipe book" or "book" or "cookery book" as cookbook.

Instead of taking cookbook, say "Cooking is part of Chef Hudson's duties. Captain's don't cook, that's rule number 3 in the Captain's handbook.".

Instead of doing something other than examining the cookbook, say "You'd better leave all the cooking to the experts -- or to Hudson anyway."


Section - Pantry

The pantry is a scenery container in the kitchen.


Section - Footprints

Footprints is a prop in the kitchen.
The description is "The flour must have fallen fallen out of the pantry. It looks like something has been scurrying over it.".

Understand "vermin footprints" or "flour" as footprints.


Section - Vermin

Vermin is a prop in the pantry.

Every turn:
	if location is kitchen and vermin is in the pantry:
		if a random chance of 1 in 5 succeeds:
			say "Something large and scaly scurries out of the room from the pantry, and through the open door to the fore.";
			remove the vermin from play.


Chapter - Middle Deck Aft Corridor

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Middle_Deck_Aft_Corridor

]

Section - Location Description

The Middle Deck Aft Corridor is a room. 
It is unscored. 
The description is "There really isn't much to see in this part of the ship. There's the door to the kitchen to starboard, although most of the crew simply walk through the canteen first; and the ship's escape pod to the aft, and the crew toilets is to the port. The corridor to the fore leads back to the rest of the ship."

Instead of going nowhere from the Middle Deck Aft Corridor:
	say "The exits are to the fore, the aft, the port, and the starboard. Which lead to the fore corridor, the escape pod, the crew toilets, and the Kitchen, respectively."


Chapter - Middle Deck Fore Corridor

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Middle_Deck_Fore_Corridor

]

Section - Location Description

The Middle Deck Fore Corridor is a room. 
The description is "[if unvisited]Using your newly-acquired torch, you descend the ladder and come to a rest outside the ship's Rec Room. There appears to be no damage to this deck beyond the loss of power and atmosphere.

[end if]The fore section of the Middle Deck corridor is the only space on the ship that movement in all six basic directions is possible. Fore is the Rec Room; Aft is more corridor; Port is the entrance to the Crew's Quarters; Starboard is the ship's Canteen; and the Top and Lower Decks can be accessed by going up or down the ladder."

Up from the Middle Deck Fore Corridor is the Top Deck Fore Corridor. 
Down from the Middle Deck Fore Corridor is the Bottom Deck Corridor. 
Aft of the Middle Deck Fore Corridor is the Middle Deck Aft Corridor.


Section - Middle Deck Ladder

A ladder called the middle deck ladder is in the Middle Deck Fore Corridor.

The description is "It leads up to the top deck, or down to the bottom deck."

Instead of climbing or entering or using the middle deck ladder:
	say "(Which way would you like to go, up or down?)"
	
Instead of using the middle deck ladder:
	try climbing the middle deck ladder.


Chapter - Rec Room

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Rec_Room

]

Section - Location Description

The Rec Room is a room.
The description is "[if unvisited]As you enter what you consider the most important room on the ship a wave of relaxation and warmth flows over you -- just before you start to panic. This room contains some of the most expensive equipment on the ship: your holo projection screen and your two priceless antique arcade machines. Not to mention your rare Pinchinko machine. What if the power surge has.....it's too horrible to even contemplate. Be strong, you think to yourself, must be strong for the crew.

[end if]To the fore side you see a large porthole, just to the right of the crew's digital-dartboard. On the port side are your two precious antique games cabinets and a Wurlitzer jukebox. Opposite these are your rare pinchinko machine and a large crate of beverages. At the centre of the room, facing towards the projection screen to the aft, are the crew's sofa, and your own lounging recliner.".

The rec room door is a doorway. The rec room door is fore of the Middle Deck Fore Corridor and aft of the Rec Room.

Instead of going fore in the Rec Room, say "It's not advisable to try and exit via the porthole. Besides it doesn't open.".

Instead of going up in the Rec Room, say "Nothing up there but luminous strip lights.".

Instead of going down in the Rec Room, say "You can't walk through the floor.".

Instead of exiting in the Rec Room when the holder of the player is the Rec Room:
	try going aft.


Section - Antique Games Cabinets

The antique games cabinets are props in the rec room.
The description is "These are both 20 and 21st century antiques, having been gifted to you many years ago by a benevolent alien probing buddy, after one too many Neptunian Slammer cocktails and a night of semi-male bonding. To be honest you've been trying not to remember the night itself clearly.

The first is emblazoned with SPACE SIMULATOR SIMULATOR, where you can watch yourself watching a wireframe representation of planets and stars flying past. This has always seemed maybe a touch too complicated and overly philosophical. Generally you just look out of a porthole if you wish to view the galactic sky.

The other games cabinet features the very retro Halo XIII. Unique game at the time for its realistic bullet-wounding system, which inevitably led to its withdrawal from sale, though thrill seeking gamers still fight for copies on the blackmarket. This version lacks the capability to wound, though will occasionally electrocute you through the coin slot out of frustration.".

Before examining antique games cabinets for the first time,
	say "Phew, it looks like your arcades are undamaged.".

Understand "arcades" or "arcade" or "game" or "machines" or "cabinets" or "arcade machines" or "cabinet" or "halo" or "space simulator" or "space simulator simulator" as the antique games cabinets.

Instead of playing antique games cabinets,
	say "Since you're already mired in a real life space adventure, there's no escapism to be had in playing these anymore.".
	
Instead of using the antique games cabinets:
	try playing the antique games cabinets.


Section - Ashtray

An ashtray is on the pinchinko machine.
The description is "It's octagonal and lime green, and has the words 'The Brown Cow' stamped on it. It's really quite horrible. There's no smoking on the ship because the filtration systems are too expensive, but Helen bought this for you as a gift a while ago. I guess she thought it was funny.".


Section - Lights

The strip lights are props in the rec room.
The description is "There are multiple luminous strip lights. One appears to flicker and gutter, attracting numerous moths. You will need to mention this breach of Intergalactic Lifeform Minor Infestation Protocol to Bryan later, and angrily reprimand him for the faulty strip light.".

Understand "striplights" or "ceiling lights" as lights.


Section - Rec Room Floor

The rec room floor is a prop in the rec room.
The description is "The floor is covered in a tile effect vinyl-substitute coating. Whilst aesthetically pleasing, you can only feel that this would have belonged on a spaceship much older, or an service platform waffle house, as it is rather scuffed and dirty.".


Section - Digital-Dartboard

A digital-dartboard is a scenery device in the rec room.
The description is "Much safer than a regular dartboard, especially when Hudson joins in due to his policy of favouring velocity over accuracy. You quickly threw out the antique dartboard after he nearly ruptured the hull. It's simple to operate, just switch it on, wear the glove, and throw.[if digital-dartboard is switched off]

At the moment, all you see is a blank rectangular panel with a single glove hanging to one side, and a small switch on the other. Along the floor is a white line marking out the position of the oche.[end if][if a glove is on the glove-hook]

An oversized glove is hanging on a hook to one side of the board[end if].".

A glove-hook is a scenery supporter in the rec room.
Understand "hook" as glove-hook.

A glove is on the glove-hook.
A glove is wearable.
The description is "An oversized plastic glove with numerous mostly useless buttons.".

Understand "oversized" as glove.

Understand "dartboard" or "dart board" or "darts" or "dart" or "board" as digital-dartboard.

After switching on digital-dartboard,
	say "You flip the switch and the panel lights up and splits into two images; one of the dartboard itself, and the other of a virtual blackboard.".

Before switching off the digital-dartboard:
	reset dartboard.
	
Before taking off the glove:
	reset dartboard.	

Instead of playing digital-dartboard when switched off,
	say "You're going to need to switch it on first.".

Instead of playing digital-dartboard when player is not wearing a glove,
	say "You need to wear the glove before you can play this.".

Instead of playing digital-dartboard:
	say "You throw a digital dart and score [darts score]".
[need to add a little mini game of darts in here]

Instead of using the digital-dartboard:
	try playing the digital-dartboard.

Understand "throw [digital-dartboard]" as playing.

The current high score is a number that varies.
The current darts score is a number that varies.
The current darts turn is a number that varies. The current darts turn is 0.

To say darts score:
	let current throw score be a random number between 1 and 20;
	let current throw multiplier be a random number between 1 and 3;
	say "[if the current throw multiplier is 2]Double [end if][if the current throw multiplier is 3]Treble [end if][current throw score].";
	let total throw score be current throw score * current throw multiplier;
	increment the current darts score by the total throw score;
	increment the current darts turn by 1;
	say "[line break]Total score: [current darts score] with [3 - current darts turn in words] darts remaining.[line break]Current high score: [current high score]."
	
Every turn when the current darts turn is 3:
	if the current darts score is greater than the current high score:
		change the current high score to the current darts score;
	change the current darts score to 0;
	change the current darts turn to 0.
	
To reset dartboard:
	change the current darts score to 0;
	change the current darts turn to 0.


Section - Beverage Crate

A beverage crate is an openable container.
The beverage crate is scenery.
The beverage crate is in the rec room.
The description is "The crate of beverages is astonishingly empty, and empty bottles are stacked nearby in a rather pleasing pyramid.".

Understand "large crate" or "crate" or "large crate of beverages" or "crate of beverages" or "beverages" as beverage crate.

Instead of opening crate, say "You'll have a drink to celebrate when you get out of this mess.".

Instead of taking the beverage crate:
	say "You never drink while you're on duty -- ok, that's a lie but it's probably not a good idea at the moment."

Some vacant bottles are scenery in the rec room. The description is "You and the crew use this pyramid as part of one of your drinking games. Anyone who finishes a bottle off has to add their empty to the top of the stack without disturbing its delicate formation. Any stack disturbers have to drink double next time, and then have to add two bottles to the stack. If they fail again, then four bottles need to be added, and so on."

The printed name of the vacant bottles is "empty bottles".

Understand "empty bottles" or "empties" or "pyramid" or "pyramid of bottles" or "bottle" or "pleasing pyramid" as the vacant bottles.

Instead of doing something other than examining with the vacant bottles:
	say "You'd better keep away from those until the crew's next booze up."




Section - Pinchinko Machine

A pinchinko machine is a scenery supporter in the rec room.

The description is "Here is the pinchinko machine, splendid in its noisiness and tacky plastic decorative frame. Not quite pachinko, not quite pinball, it was the product of the malfunctioning AI of the the almost entirely automated Gottlieb manufacturing plant. A mere 14734 of these machines were produced before the CEO of the company turned up late for work the next day and averted the crisis by pressing a large red stop button. [if the ashtray is on the pinchinko machine]There is an ornamental ashtray perched on top, and[otherwise]There are[end if] cup-rings around the base, evidence of one too many nights sat at the machine.

The machine is off, looks like it's been unplugged. The plug lays on the floor at the back of the machine. No surprise really considering how much noise this thing makes.".

Understand "pinchinko" or "pinball" or "pachinko" or "pinball machine" or "pachinko machine" or "rare pinchinko machine"as the pinchinko machine.

Instead of playing pinchinko machine, say "Maybe later.".

Instead of plugging in the pinchinko machine, say "You plug the machine in. [if the helmet is worn]It begins to rattle and shake manically, forcing you to unplug it again.[otherwise]It begins to make a horrible rattling noise accompanied by enthusiastic beeping noises, forcing you to unplug it again.".

The pinchinko plug is part of the pinchinko machine.
	 

Section - Porthole

The rec room porthole is scenery in the rec room.
The description is "It's about 3 metres in diameter. The view is usually exceptional when you're traveling through high traffic areas, but all you see now is a dead rodent stuck to the outside of the porthole, and this spoils the view somewhat.".

Understand "porthole" as rec room porthole.

Instead of opening rec room porthole, say "Hudson already tried that last week and that nearly got you and the entire crew killed. Best leave it alone."

Instead of attacking rec room porthole, say "After seeing the consequences of a near hull breach once due to a reckless darts throw, you can say from experience that doing that is not a good idea.".

A rodent is scenery in the rec room. The description is "Curious...there is no such species as a space-rodent...so what is this doing here. You must have picked it when your ship was last docked. You'll get Bryan to don the EVA pack later and give the porthole a good squeegying with some windex."

The printed name of the rodent is "dead rodent".


Section - Holo-Projection Screen

A holo-projection screen is scenery device in the rec room.
The description is "[if holo-projection screen is switched on]The screen is playing an ancient documentary called 'Brass Eye'. You recall this was at one point hailed as a radical new guide to intelligent and democratic thought process, when discovered by President Schwarzenegger, and for a time was used as the groundroots of a new era of advanced human civilisation. Surprisingly, Old Earth changed for the better, and was like a perfect utopia until old habits set it once again. [else]It's blank. How boring.[end if]".

Instead of switching on the holo-projection screen when the holo-remote is not carried:
	say "The screen can't be operated manually. If you could find the remote you could probably get it to work though."
	
Instead of using the holo-projection screen:
	try switching on the holo-projection screen.

Instead of switching off holo-projection screen when player does not have holo-remote,
	say "You need the remote to switch the projector off.". 

A holo-remote is a thing.
The holo-remote is on the sofa.
The description is "The remote is about 9 inches long, made of brushed steel."

Understand "screen" or "tv" or "telly" or "television" or "projection screen" as the  holo-projection screen.

Understand "screen remote" or "remote" or "remote control" or "tv remote" or "tv remote control" or "holo control" or "holo remote" as holo-remote.


Section - Recliner

A recliner is a scenery chair in the rec room.
The description is "An old suede recliner. They don't make chairs like this anymore. Possibly your 3rd favourite seat in the ship. Unable to get her hands on your bridge seat, Commander Suze often sits here giving you unimpressed looks.".

Understand "reclining chair" or "lounger" or "lounging" or "lounging chair" as recliner.

Instead of raising or lowering the recliner, 
	say "Unfortunately your recliner isn't height adjustable.".
	
Report entering the recliner:
	say "You ease into the recliner." instead.


Section - Sofa

A sofa is a scenery chair in the rec room.
The description is "A now battered old sofa, you think it's seen better days but you don't specifically recall them. When you bought the ship you had this room done out like new but now you can't remember it ever being nice.[if something not handled is on the sofa][sofa-state]."

To say sofa-state:
	if the not handled holo-remote is on the sofa and not handled gas cylinder 2 is on the sofa:
		say " The remote control for the screen lays on the arm of the sofa and a gas cylinder sits in the gap between cushions";
	otherwise if the not handled holo-remote is on the sofa:
		say " The remote control for the screen lays on the arm of the sofa";
	otherwise if the not handled cylinder is on the sofa:
		say " A gas cylinder sits in the gap between cushions".

Understand "couch" or "setee" as sofa.

Instead of raising or lowering the sofa, 
	say "The sofa isn't height adjustable.".


Section - Gas Cylinder 2

gas cylinder 2 is a gas cylinder.
gas cylinder 2 is on the sofa.
After examining gas cylinder 2, say "Looks like the crew have been inhaling from this one again (pure oxygen gives a person quite a buzz), hopefully there is enough left for your use.".


Section - Wurlitzer Jukebox

A wurlitzer jukebox is a scenery device in the rec room.
The description is "Like much in this room it has a gloriously retro feel to it. Loaded with Ultra-Definition Discs (UDDs) and flared into an oddly asymmetrical curve shape. You cannot help but think you may have been ripped off when the seller said he could 'give you a totally unique one'.

The jukebox contains many different genres of music, and many diverse artists. This includes a large selection of drum'n'bass, hip-hop, electronica, and dubstep. However, you've never been a classical music fan. There is also a large collection of works by Lemmy Kilminster, the 6-nuclear war veteran and intergalactic conqueror. Good taste dictates that these are played on public holidays and royal occasions.".

Understand "wurlitzer" or "jukebox" as wurlitzer jukebox.

Instead of switching on wurlitzer jukebox when the helmet is worn:
	say "[if repressurising the ship has ended]You're going to need to take your helmet off to hear properly.[otherwise]With no atmosphere you are sadly going to have to do without the strains of Lemmy Kilminster for the time being.".
	
Report switching on the wurlitzer jukebox:
	say "You fire up the jukebox choosing the best of Lemmy Kilminster.";
	stop the action;
	
Report switching off the wurlitzer jukebox:
	say "Reluctantly, you switch off the jukebox.";
	stop the action.
	
Every turn when the wurlitzer jukebox is switched on and the turn count is even:
	if the helmet is not worn:
		say "[one of]You can hear the strains of Lemmy Kilminster pounding out of the jukebox.[or]'If you like to gamble, I tell you I'm your man'...[or]...'you win some, lose some, it's all the same to me'...[or]...'The pleasure is to play, it makes no difference what you say'...[or]'...I don't share your greed, the only card I need is...'[or]'the ace of Spades, the ace of Spades'...[or]...'Playin['] for the high one, dancin['] with the devil...'[or]...'going with the flow, it's all a game to me'...[or]...'7 or 11, snake eyes watching you'...[or]...'Double up or quit, double stake or split...'[or]...'the ace of Spades, the ace of Spades'...[or]...'You know I'm born to lose, and gamblin's made for fools...'[or]'...But that's the way I like it baby, I don't want to live forever'...[or]'...and don't forget the joker...'[or]
'...Pushing up the ante, I know you got to see me...'[or]'...read 'em and weep, the dead man's hand again...'[or]'...I see it in your eyes, take one look and die...'[or]...The only thing you see, you know it's gonna be...'[or]...the ace of spades...the ace of spades...[cycling]";
	otherwise:
		say "You hear some muffled sounds coming from the jukebox."


Part - Bottom Deck

Chapter - Locations in the region

The Bottom_Deck is a region. The Engine Room, the Generator Room, the Janitor's Cupboard, the Bottom Deck Corridor, the Port Cargo Hold, and the Starboard Cargo Hold are in the Bottom_Deck.


Chapter - Engine Room

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Engine_Room

]

Section - Location Description

The Engine Room is a room.
The description is "The cavernous space is dominated by the engine protruding from the aft wall.
Located on the port wall, opposite a [if the cylinderCount is 0]markedly empty gas storage rack[otherwise]gas storage rack with [cylinderCount in words] cylinder[s] in it[end if], is the engine room control panel. Fore leads back into the bottom deck corridor.".

The engine room door is a doorway. The engine room door is aft of the Bottom Deck Corridor and fore of the Engine Room. The engine room door is manual.

Instead of exiting in the Engine Room when the holder of the player is the Engine Room:
	try going fore.


Section - The space putty

Some space putty is in the engine room. "A box of space putty is next to the gas storage rack." The space putty can be gloopy or solid. The space putty is solid.

Understand the gloopy property as describing the space putty.

The indefinite article of the space putty is "some". The space putty can be gloopy.

Before printing the name of the gloopy space putty, say "gloopy ".

After inserting the space putty into microwave, say "You place the solid mass inside the microwave.".

The description of the space putty is "[if the space putty is gloopy]The space putty is now viscous and easily mouldable.[otherwise]This stuff has a million and one uses supposedly. Hopefully you can find just one that will help repair your ship. Right now it's just solid hard block, extremely strong and highly heat resistance but expose it to radiation and it'll temporarily turn into an easily shapable gloop. "


Section - Gas Storage Rack

The gas storage rack is a scenery container in the engine room.
The description is "The rack is designed to hold four canisters of emergency air supply in case of depressurisation. There [if the cylinderCount is 1]is[otherwise]are[end if] currently [cylinderCount in words] cylinder[s] in the rack.".
The carrying capacity of the gas storage rack is 4.

After examining the gas storage rack for the first time:
	say "You really should keep better track of these. No doubt the crew have been using them for some use that they weren't designed for....your last game of spin the bottle springs to mind.".

Understand "gas rack" or "rack" or "storage Rack" or "gas storage" as gas storage rack.

The cylinderCount is a number which varies.
The cylinderCount is 0.

Before inserting noun into gas storage rack:
	if noun is not a gas cylinder:
		say "You really don't want to put anything other than a gas cylinder in there.";
		stop the action.
		
Instead of taking a gas cylinder that is in the storage rack:
	say "There's no need to do anything with this gas cylinder other than put it where it belongs....which is here. Best leave it."


Section - Engine Room Control Panel

The engine room control panel is a prop in the engine room.
The description is "The engine room control panel consists of a large display screen, a standard numerical keypad and a series of buttons. Most noted of which at this time is the one marked 'Activate Re-pressurisation Sequence'.

[if fixing the hull breach has not ended]The display sceen is currently flashing:
WARNING!!! Hull breach in Starboard Cargo Hold. 
Ship cabin pressure: Vacuum.[otherwise if repressurising the ship has not ended]The display sceen is currently flashing:
WARNING!!! Ship cabin pressure: Vacuum.[otherwise]The display screen currently displays:
Ship cabin pressure: Nominal.[end if]".

Understand "control panel" or "engine control panel" or "panel" or "keypad" or "standard numerical keypad" or "numerical keypad" as the engine room control panel.

The commandCode is an indexed text that varies.
The shipPressurised is a truth state that varies. shipPressurised is false.

To decide whether inputing command code: 
	if the command prompt is "Enter command authorisation code: ", yes; 
	no. 

The re-pressurisation button is a device.
The re-pressurisation button is a part of the engine room control panel.

Understand "pressurisation" or "re-pressurisation" or "repressurisation" or "repressurization" or "pressure" as "[repressurisation]". Understand "[repressurisation] button/switch/sequence" or "sequence button" as re-pressurisation button.

Understand "press [re-pressurisation button]" as switching on.
Understand "activate [re-pressurisation button]" as switching on.

Instead of switching on re-pressurisation button:
	if fixing the hull breach has not ended:
		say "You haven't fixed the hull breach yet. Re-pressurising the ship now would just be a waste of precious gases.";
	otherwise if the gas storage rack contains 4 gas cylinder:
		say "Re-pressurisation sequence initiated!!!";
		change the command prompt to "Enter command authorisation code: ";
	otherwise:
		say "Insufficient gas in storage rack, re-pressurisation sequence aborted.".
		
Instead of switching on the re-pressurisation button when repressurising the ship has ended:
	say "There's no need to use that anymore, the ship's been successfully re-pressurised." 

After reading a command when inputing command code: 
    	if the player's command includes "79655":
		change the command prompt to ">";
		change shipPressurised to true;
		change oxygen level to 700;
        		say "Re-pressurisation sequence engaged.......

Nothing happens for a second or two, then you hear a steadily rising hissing noise. You feel your suit start to deflate around you as the pressure equalises, and after less then a minute the cycle completes. You can faintly hear the dull whirr of the air circulators.

Great. The ship should be fully pressurised in just a second. Now all that's needed is to fix the engines, then you can set the ship on its course to Eighteen again.";
		reject the player's command;
	otherwise:
		change the command prompt to ">";
		say "Invalid command code!!";
		reject the player's command.

Instead of looking when inputing command code: do nothing.
Instead of going when inputing command code: do nothing.

Section - The Tiger Drive

The Tiger Drive is scenery in the engine room. The description is "[if the engines are fixed]The engines are now in good working order on the inside and the outside. Now you just need to start the ignition on the bridge.[otherwise]This is the Tiger Drive 4000 Twin Thruster series engine. Not the most modern technology but it gets you where you want to go (most of the time.) You look over the engine for any signs of damage. The compression levels look good. The starter battery seems to be at full power and the duct tape that holds the improbability (B00H155) drive to the crankshaft is holding. The doohickey still doesn't switch on or off but it's been like that since it was chewed on by that enormous space-gator, so that's ok. The starter solenoid is in perfect order and the laser-optical-distributor cap (that the crew often use as a rotating disco ball) is completely undamaged. It's just as you feared -- the problems with the engines are on the outside of the ship. You're going to have to wear the EVA pack, exit the airlock, and fix the engines from the outside[end if][if we have not examined the tiger drive]. This day just keeps getting better and better[end if]."  

Understand "engine" or "engines" as the tiger drive.

Does the player mean examining the tiger drive: it is likely.

Does the player mean examining the engine room door in the engine room: it is unlikely.


Chapter - Generator Room

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Generator_Room

]

Section - Location Description

The Generator Room is a room. 
The description is "[if unvisited]In the stillness of this usually chaotic area sits your pride and joy, the Honnecourt Generator. You knew when you saw her on the RQD shopping network, you had to have her. Just like you had to have that anti-gravity spittoon, the unicycle step ladder, those alarm clock pepper shakers, the umbrella poncho, and not forgetting the -- deeply flawed -- anti-hiccup face bag. Nevertheless, holo-host Mr Twelve was adamant that the Honnecourt generator was the latest development in energy technology; a self-contained, self-powered, bio refinery unit with the durability of a Xanthurian bomb shelter, capable of producing enough energy from a single load to sustain a ship thrice the size of yours. It seems to be broken.

[end if]The metal walls have a distinctly green tinge here, and the ceiling arcs overhead in a way that brings to mind an ancient railway bridge or viaduct. 

The Honnecourt generator is [if generator shaking is happening][one of]gently vibrating[or]vibrating strongly[or]shaking wildly[or]quaking dangerously[or]dangerously out of control[stopping].[otherwise if the honnecourt generator is working]online, and purring gently.[otherwise]offline and dominates the centre of the room, grey and malevolent. A bewilderingly complex series of pipes and wires spews from its back and disappear into the starboard wall, and the backup generator nestles snugly at its side, the sole source of the ship's power.[end if] To the port is the entrance to the Janitor's room, next to some green storage lockers."

Instead of going nowhere from the Generator Room, say "The only exits are to the port and aft."

Instead of exiting in the generator room when the holder of the player is the generator room:
	try going aft.


Section - Props

Some components are a prop in the generator room. The description is "The components are: the bioreactor chamber, the separation chute, the gasifier balloon, and the control box.";

A ceiling is a prop  in the generator room. The description is "It arcs menacingly above your head."

Some green tinged walls are a prop in the generator room. The description is "What from a distance is just a green tinge, close up, is actually space fungi. Of the teladru variety, if you're not mistaken. Entirely harmless -- as long as you don't touch, smell, eat, or stare at it for too long."

Understand "walls" or "wall" or "fungus" or "fungi" or "teladru fungus" as the green tinged walls.

Instead of touching the green tinged walls:
	say "You run your hands over the viridescent carpet and watch as a million mossy microbes start running a marathon up your arm. You stumble backward into the [a random thing that is part of the honnecourt generator], frantically trying to dust away the creatures, but it's too late; a green film starts covering the glass of your helmet, spreading, thickening until all you see is darkness. Your body feels heavy, as if gravity has increased. You slump down, with a million ice picks hacking away at your intestines. You don't feel so good.";
	end the game saying "[yourDead]". 
	
Before eating the green tinged walls:
	say "Yes sir! You march over to the walls without hesitation -- but then you halt; with your helmet on, you're not going to be able to yum up the deadly fungus... deadly fungus! You jump backwards from the wall in fright. You were about to eat one of the most deadly fungus's known to mankind (alienkind have a lot of deadlier fungi to not eat.) You sigh. 'Saved me again, eh kid,' you think, knocking your glassy compadre in a gesture of thanks." instead.
	
Instead of smelling the green tinged walls:
	say "You lean in close to the fungus and breathe in, awaiting the musky odour and spidery sticktuitive symptoms of teladru inhalation, but you get nothing. You step back for a moment in wonderment -- could it be that you've found the legendary odourless herlock strain of teladru, supposed to grant its inhalee the power of 24/20 vision, and an intuitive walnut radar -- no, wait[if the helmet is worn]. You've got your helmet on. Drat.[otherwise]. No wait, it's not teladru after all, just moss. You can't help but feel a tad disappointed that you didn't die in one of the most horrible ways imaginable.[end if]".


Section - Generator room door

The generator room door is a doorway.
The generator room door is fore of the Bottom Deck Corridor and aft of the Generator Room. It is privately-named.
The generator room door is manual.

Understand "generator room door" or "door" as the generator room door.

Before going through the closed generator room door:
	say "(first opening the [generator room door])";
	silently try opening the generator room door.


Section - Storage Lockers

Some storage lockers are in the Generator room.
The storage lockers are scenery.
The description of the storage lockers is "Three sheet steel lockers. You would probably remove them if they weren't securely welded to the wall as they do tend to clutter the place up."

Instead of pulling the storage lockers:
	say "Yep, they're welded to the wall alright."

Instead of opening the storage lockers when at least one locker is unexplored:
	try searching the storage lockers.

Instead of searching the storage lockers when at least one locker is unexplored:
	say "You search ";
	if no locker is explored:
		say "all three lockers, discovering nothing in the first and second, but in the third locker you ";
	if exactly two lockers are unexplored:
		say "the remaining two lockers. In the second you find nothing, but in the third you ";
	if exactly one locker is unexplored:
		say "the last locker. In it you ";
	say "are surprised to find a mini fuel canister.";
	now all the lockers are open;
	now the mini fuel canister is in the generator room;
	try taking the mini fuel canister;
	now all the lockers are explored.
	
Instead of examining the storage lockers when the mini fuel canister has been handled, say "There's nothing else of any interest in the storage lockers."

Instead of opening or closing the storage lockers when the mini fuel canister is handled, say "Now that you've found the canister, these lockers are dead to you.";


Section - Left, middle, and right lockers

The left locker is a locker. 
The middle locker is a locker. 
The right locker is a locker. 
The left locker, the middle locker, and the right locker are part of the storage lockers.	


Section - Mini Fuel Canister
	
A mini fuel canister is a thing. The description is "A small matt black cylinder, this contains an incredibly highly pressurised mixture of propellant gases. A generic coupling allows connection to several appliances.".

Understand "small" or "black" or "matt" or "cylinder" as the mini fuel canister.


Section - The Generator

Does the player mean doing something when the noun is the honnecourt generator: it is likely.

The honnecourt generator is a prop in the Generator room. The description is "The generator is comprised of several components set upon a metal frame, enshrined amidst a web of tangled wires and twisting pipes. The hub of the mess is the bioreactor chamber at the center. Extending diagonally upwards from its bottom is the separation chute, and looming above it is the gasifier balloon, suspended on a long metal pole.	
To the right, the main control box dangles from a thick coaxial cable.[if the separation chute is undiagnosed][paragraph break]You look over the generator for any signs of damage, but can't find any. Maybe taking a closer look at the components will turn something up.".

Instead of examining the unclogged honnecourt generator, say "Now that the generator's unclogged, all you need to do is press the green button on the control box to activate it."

Instead of examining the working generator, say "It seems to be working again.".

The honnecourt generator can be clogged or unclogged. It is clogged. The generator can be malfunctioning. The honnecourt generator can be working. The honnecourt generator is not working.

Instead of examining the honnecourt generator when the honnecourt generator is working:
	say "The metal frame shakes gently as the generator goes about it's work.".
	
After examining something(called target) that is part of the honnecourt generator when the separation chute is undiagnosed:
	if the honnecourt generator is clogged:
		if we have not examined the target:
			if the target is the bioreactor chamber:
				say "The [bioreactor chamber] looks fine, although it's unusual to see it so motionless and still.";
			if the target is the gasifier balloon:
				say "The gasifier seems to be in perfect working order, no tears or rips.";
			otherwise:
				continue the action;	
		 otherwise:
			continue the action;
	otherwise:
		continue the action.

Instead of attacking the honnecourt generator:
	say "[if the honnecourt generator is not working]The generator's already offline, there's no need to cause further damage.[otherwise]You were lucky to get it fixed in the first place, so you're not going to break it now.".
	
Instead of switching on the honnecourt generator:
	say "(by pressing the green button on the control box)[command clarification break]";
	silently try switching on the green button.
	
Understand "start [honnecourt generator]" as switching on.

Understand "restart [honnecourt generator]" as switching on.
	
Instead of attacking the generator during generator shaking:
	say "You whack the generator, but that only serves to make it angrier.".
	
Instead of doing it for the second time:
	say "That's not going to do the trick! You've got to switch it off!".
	
Instead of switching off the honnecourt generator:
	say "(by pressing the red button on the control box)[command clarification break]";
	silently try switching on the red button.

Instead of fixing the honnecourt generator when the honnecourt generator is clogged:
	say "It's not as simple as that. You need to find the source of the problem first.".
	
Instead of using the honnecourt generator:
	try switching on the honnecourt generator.


Section - Aluminium Tube

The aluminium tube is part of the bioreactor chamber. The description is "A two foot tube that joins the separation chute to the main chamber. This is where the fuel is pulped before it enters the bioreactor.";


Section - Control Box

The control box is part of the honnecourt generator. The description is "The controls are a masterpiece in minimalist design, with only two buttons, a small light, and an output slot.[if something is in the output slot] In the output slot is [a list of things in the output slot]."

The minimalist buttons are part of the control box. The description is "Buttons don't get much simpler than this. There's a green one and a red one."


Section - The Green button

A green button is part of the control box. 
The green button is a device. 
The description of the green button is "A round green button, that simply cries out 'press me'.".

Instead of switching on the green button when the generator is clogged for the first time:
	now the generator is malfunctioning.
	
Instead of pushing the green button during generator shaking:
	say "[if the honnecourt generator has been malfunctioning for more than three turns]Pushing that's what got you into this mess in the first place.[otherwise]Pressing that does nothing.".

Instead of pushing the green button:
	try switching on the noun.
		
Instead of switching on the green button during generator shaking:
	say "Press the green button isn't going to stop the generator!".
	
Instead of switching on the green button when the honnecourt generator is working:
	say "There's no need to use this now that the generator's working again.".
	
Instead of switching on the green button when the honnecourt generator is unclogged:
	now the honnecourt generator is working.

Does the player mean switching on or pushing the green button: it is likely.

Instead of switching on the green button:
	if generator shaking has happened:
		say "You'd better not, you were lucky to avoid an explosion the last time.";
	otherwise:	
		continue the action.


Section - The Red Button
	
Instead of pushing the red button:
	try switching on the noun

Instead of switching on the red button:
	if generator shaking is not happening:
		say "[if the honnecourt generator is working]That's the last thing that you want to press, now that you've got the generator working again.[otherwise]You press the red button, but since the generator is already off, nothing happens.";
	otherwise:
		now the red button is switched on.

A red button is part of the control box. It is a device. The description is "A round red button that cries out 'if you need to press me, you're in trouble'."

A small light is part of the control box. The description is "It's flashing [if the honnecourt generator is not working]red[otherwise]green."


Section - The output slot

The output slot is part of the control box. It is a container. Inside the output slot is a piece of paper.

every turn:
	if we have examined the piece of paper:
		now the printed name of the piece of paper is "generator report".
		
Understand "damage report" or or "generator report" as the piece of paper.

The second generator report is a thing. The description is "[second generator report]";

Instead of examining the second generator report :
	if the second generator report  is not carried:
		silently try taking the second generator report ;
		say "(first taking the [second generator report ])[command clarification break]";
	say "[second generator report ]".

Instead of examining the piece of paper:
	if the piece of paper is not carried:
		silently try taking the piece of paper;
		say "(first taking the [piece of paper])[command clarification break]";
	say "[generator report]".
	

To say second generator report:
	say fixed letter spacing;
	center "BIOREACTOR -  STILL FUNCTIONAL";
	center "GASIFER - STILL FUNCTIONAL";
	center "SEPARATION CHUTE - [italic type]STILL[ROMAN TYPE] NON- OPERATIONAL";	
	center "WARNING OBSTRUCTION STILL PRESENT!!!";
	center "PLEASE CLEAR BLOCKAGE INSIDE THE SEPARATION CHUTE BEFORE REACTIVATING";
	center "I DON'T CARE HOW YOU DO IT: STICK SOMETHING IN IT, PULL SOMETHING OUT OF IT.";
	CENTER "AND DON'T PRESS THE GREEN BUTTON AGAIN UNTIL YOU'VE DONE IT.";
	say variable letter spacing.

To say generator report:
	say fixed letter spacing;
	center "BIOREACTOR - FUNCTIONAL";
	center "GASIFER - FUNCTIONAL";
	center "SEPARATION CHUTE - NON-OPERATIONAL";
	center "OBSTRUCTION....SYSTEM SHUTTING DOWN TO PREVENT DAMAGE";
	center "PLEASE MANUALLY CLEAR BLOCKAGE BEFORE RESTARTING";
	say variable letter spacing.

Every turn:
	if we have examined the generator report:
		now the printed name of the generator report is "generator report."
		
Does the player mean examining the second generator report when the second generator report is on-stage: it is likely.

Instead of inserting something into the output slot:
	say "You can't put stuff in there, it's an [bold type]output [roman type]slot. Things only come out of there."


Section - Bioreactor chamber

The bioreactor chamber is part of the honnecourt generator. The description is "It's a large hourglass shaped tank. This is where the organic fuel is fermented by the industrial bacteria to create the ethyl alcohol, which is then combusted and converted to electricity via the rotary Wankel engine.".


Section - Gasifier Balloon

The gasifier balloon is part of the honnecourt generator. The description is "[if the honnecourt generator is not fixed]It's all flat and droopy, a sorry sight indeed. Normally this would be inflated while converting the residual waste into propane, but since the generator isn't working, it's just limp.[otherwise]The gasifier inflates and deflates slowly, as if in meditation.".


Section - Pipes and Wires	

Something called pipes and wires are part of the honnecourt generator. The description is "They weave their way in and around the generator like toilet-roll rigging on a sea-urchin's schooner.".


Section - Long Metal Pole	

Something called long metal pole is part of the honnecourt generator. The description is "A long shiny metal pone from which the balloon gasifier is suspended.".


Section - Metal Frame	

Something called metal frame is part of the honnecourt generator. The description is "It's the solid metal frame on which the generator stands, in remarkable condition[if generator shaking has happened] despite all the shaking[end if].".


Section - Separation Chute

The separation chute is part of the bioreactor chamber. It is a container. Inside the separation chute is Janitor Bot Bryan. Janitor Bot Bryan is a male animal. A blockage is inside the separation chute. The blockage is a prop. The separation chute can be examined or unexamined. The separation chute can be diagnosed or undiagnosed.

Every turn:
	if the piece of paper has been handled:
		now the separation chute is diagnosed;
	if the separation chute is examined:
		now the separation chute is diagnosed.
		
Every turn:
	if bryan is hurt:
		now the separation chute is diagnosed.

Definition: a thing is helpful:
	if it is the plunger, decide yes;
	if it is the long hook, decide yes;
	otherwise decide no.
	
Definition: a thing is dangerous:
	if it is the shovel, decide yes.
	
Definition: Bryan is stuck:
	if bryan is in the separation chute, decide yes.

Instead of opening the separation chute:
	say "It's already open."
	
Instead of entering the separation chute:
	say "That's not a good idea. You might be able to squeeze in, but there would be no room to manoeuvre and you'd almost certainly get stuck"

Instead of examining the undiagnosed separation chute:
	if the honnecourt generator is clogged:
		say "It's a square plastic chute with a gaping mouth, about a metre in length that reaches diagonally upwards from a short aluminium tube attached to the base of the bioreactor chamber. The inside of the chute is filthy and covered in a gunk; the outside is not much cleaner, either.[paragraph break]You can't see anything wrong with the chute on the outside, maybe there's something in it.";
		now the separation chute is examined;

Instead of examining the separation chute when not seen bryan is hurt:
	if the generator is clogged:
		say "You can still see the vague shadow of the obstruction near the bottom of the chute, looks like it needs one more push to dislodge it completely.";
	otherwise:
		continue the action.

Instead of examining the separation chute:
	if the honnecourt generator is clogged:
		if Bryan is seen:
			say "Bryan is wedged near the bottom of the chute, not far from the pulpifying mechanisms! He's lucky to be alive. He looks [if Bryan is hurt]hurt... he was probably injured before you put the shovel down the chute, yeah makes sense. Bryan definitely has no cause to pick one of his most vicious janitorial tools and do bloody murder on you. That's just be silly.[otherwise]fine, apart from the damage done to his precious backpack, which is almost completely destroyed. He's going to be livid once you get him out.";
		otherwise:
			say "You think see the faint impression of something near the bottom; possibly something metallic. Perhaps some debris could have dropped into the chute from above, but it's too dark in there to be sure. Whatever it is, this is certainly the source of the blockage. You wonder if you could prod the clog, and force it through to the chemical erosion chamber. Not the ideal solution, but you're no engineer, and thinking wastes precious oxygen.";

Instead of examining the separation chute when the honnecourt generator is unclogged, say "You peer into the chute looking for any further obstructions, but everything looks clear."
		
Instead of examining the separation chute when something helpful(called target) is part of not seen Bryan:
	say "Nice work, the [target] is attached to the obstruction. Now all you've gotta do is pull it and hope for the best."
				
Instead of examining the separation chute when something helpful(called target) is part of seen Bryan:
	if the target is the plunger:
		say "Nice work, it looks like the plunger is attached to Bryan. One pull on it should do the trick. You just hope the plunger's suction is up to the job." instead; 
	if the target is the long hook:
		say "Good, the long hook has caught on what remains of Bryan's backpack straps. Now you've just got to pull on it and hope that the fabric holds" instead; 
	otherwise:
		continue the action.
	
Instead of searching the separation chute when the honnecourt generator is clogged:
	now the separation chute is diagnosed;
	if Bryan is not seen:
		if a random chance of one in three succeeds:
			say "You squint your eyes as if doing so would enable infra red vision (you've actually made enquiries about getting a night vision eye implant, but the medi corps only operate on [italic type]pairs[roman type] of eyes, which is ridiculous. You've tried to convince Johnson to go in halves with you, but no dice) but due to a situation outlined in the previous parentheses, that'd be imposs -- wait! You see a spark! You see what it is! It's Bryan the Janitor Bot! He's stuck down the chute!";
			now Bryan is seen;
		otherwise:
			say "[one of]There's definitely something stuck in the chute, but it's too dark to see what.[or]Yes, it's -- no, that's just a shadow.[or]You change the angle of your viewpoint, hoping to see something, but it's too dark.[or]It's just too dark to see anything down there.[stopping]";
	otherwise:
		continue the action.

Instead of searching the separation chute when Bryan is seen:
	try examining the separation chute.

The gunk is part of the separation chute. The description is "A shimmering, black, viscous gel. It appears to smoke slightly, and pulsate of its own accord."

Before eating the gunk:
	say "Didn't you read the description of the horrible gunk?[run paragraph on][if we have not examined the gunk] No!? Then let me enlighten you[otherwise]Let me reiterate[end if]: 'a shimmering' (actually that sounds quite nice), 'black' (black...like the black death...or worse, black puddings), 'viscous gel' (hmm okay, this [italic type]could[roman type] be something tasty, but it's more likely to  something quite horrible, like toxic waste, or a pro-biotic yogurt), 'it appears to smoke slightly' (this could go either way; a barbecue burger or a charred corpse, depends on your mentality), 'and pulsates of its own accord' (Checkmate.) Nobody of sound mind would try and eat something that pulsed of its own accord. Consider your request well and truly rejected. 
	
{The poor fool, little does he know that the gunk is actually hydrogelatic oxide, a substance that when ingested, goes straight through to the blood stream as pure oxygen. And nobody suspects. Nobody suspects at all. Ha ha ha wha aha ha ha ha.}";
	say line break instead. 

Before doing it for the second time:
	say "{Apologies, but the narrator of this game is completely oblivious to the life giving properties of the gunk, so you'll simply have to find another way to stop yourself from suffocating. Possibly by repressurising the ship.

Yours sincerely,

Professor Curly Brackets.}";
	say line break instead.


Section - The blockage

The description of the blockage is "You can see the source of the trouble inside the separation chute, but it's just too dark in there to make out exactly what it is. Something must've fallen in there.";

Understand "obstruction" or "something metallic" or "metallic" or "debris"or "clog"as the blockage.

Every turn:
	if Bryan is seen:
		remove the blockage from play.;
	if the honnecourt generator is unclogged:
		remove the blockage from play.

Understand "blockage" or "obstruction" or "clog" as Bryan when Bryan is seen.

Instead of inserting something helpful(called target) into the blockage:
	try inserting the target into the separation chute.
	
Instead of inserting something dangerous(called target) into the blockage:
	try inserting the target into the separation chute.
		
Instead of tying something helpful(called target) to the blockage:
	try inserting the target into the separation chute. 
		
Instead of hitting the blockage with something dangerous(called target):
	try inserting the target into the separation chute.

Instead of pulling, or taking the blockage:
	say "You reach into the chute to try and grab the obstruction, but it's too far down. You're going to need put kind of hook to put down there to get the blockage out.";
	
Instead of attacking the blockage, say "You could break up the clog, but not using your bare hands."
	
Instead of pushing the blockage, try attacking the blockage.

Instead of using something dangerous on the blockage:
	try inserting the noun into the second noun.

Understand "use [something dangerous] to break/force/push/destroy/remove [blockage]" as inserting it into.

Understand "put [something dangerous] in/down [separation chute] " as inserting it into.

Understand "use [long hook] in [separation chute] " as inserting it into.

Understand "break up [something dangerous] with/using [something dangerous]" as inserting it into(with nouns reversed).

Understand "break up [blockage]" as attacking.

Understand "push [blockage] with/using [something dangerous]" as inserting it into(with nouns reversed).

Understand "push [something dangerous] into/in/inside [separation chute]" as inserting it into.

Understand "unclog [blockage] with/using [something dangerous]" as inserting it into(with nouns reversed).

Understand "remove [blockage] with/using [something dangerous]" as inserting it into(with nouns reversed).

Understand "force [blockage] through to erosion chamber with/using [something dangerous]" as inserting it into(with nouns reversed).

Understand "push [blockage] through to erosion chamber with/using [something dangerous]" as inserting it into(with nouns reversed).

Understand "put [something dangerous] into/down [separation chute]" as inserting it into.

Understand "prod [blockage] with/using [something dangerous]" as inserting it into(with nouns reversed).

Understand "clear [blockage]" as taking.

Understand "clear [bryan]" as taking. 


Section - Bryan

Janitor Bot Bryan can be dead, hurt, or alive. Bryan can be seen. Bryan is not seen. Janitor Bot Bryan is alive.

Understand "backpack" or "rucksack" as bryan.

Instead of searching Bryan:
	say "You move to give Bryan a quick frisk, but think twice about it after he glares ferociously at you." 

Janitor Bot Bryan can be plungered. Bryan can be grateful. Bryan can be angry. Bryan can be unconscious.
Bryan can be finding reward. Bryan can be fetching reward. Bryan can be searching junk. Bryan can be resting. Bryan can be returning home. Bryan can be on-duty. Bryan can be working. Bryan can be passive or active.

Rule for writing a paragraph about not stuck Bryan:
	if Bryan is plungered:
		say "Bryan's in a panic, desperately trying to get the plunger off his head.";
	if Bryan is grateful:
		say "[one of]Bryan whizzes around you in a circle. He looks happy to have been pulled out of the chute.[or]Bryan does a robot dance in celebration. Not as good as [italic type]your[roman type] robot dance, but pretty good.[or]Bryan's bouncing around your feet, trying to hug you -- you hold him at bay with the palm of your hand.[or]Bryan does a hop and flutters his wings.[at random]";
	if Bryan is angry:
		say "[one of]Bryan limps towards you menacingly, eye burning red -- he looks angry. Very angry.[or]You make apologetic gestures to the lurching, zombie-like Bryan, but he pays no attention. He's coming for you.[or]Bryan's frantically trying to find something in his backpack, probably something sharp and pointy to do bloody murder on you with.[or]This is silly, you decide. Ok, so you smashed Bryan up a little. You did do the right thing in the end and [italic type]save[roman type] his life -- if he survives his injuries, that is. You wave a finger at bryan and stamp your feet, the international gesture for 'stop being such an ungrateful so and so.'[or]Bryan's getting close.[stopping]";
	if Bryan is unconscious:
		say "[one of]Bryan's close now, it looks like he's going to strangle you. Just as he reaches out to grab you he suddenly stops. 'Realised just how ungrateful you were being, eh' you think to yourself. The frozen Bryan slowly starts to topple over -- CLANG, Bryan's unconscious on the floor.[or]Bryan's passed out on the floor, you better get him to his hammock to recuperate.[stopping]";
	if Bryan is searching junk:
		say "[one of]Bryan is furiously searching through the junk on the floor.[or]Just when you think he's found what he's looking for, he dumps it and dart over to a different junkpile.[or]What's that he's was holding?? Whatever it was, Bryan wasn't happy with it, as it promptly got dumped.[or]Bryan's still [one of]scrambling around[or]zipping around[at random], [one of]looking[or]searching[at random] for something.[stopping]";
	otherwise:
		continue the action.

Before doing something to the separation chute when the player does not carry the auroscope:
	if the auroscope is in the location:
		if bryan is seen:
			say "(first taking the auroscope)";
			silently try taking the auroscope.

Instead of examining stuck Bryan:
	if bryan is not seen:
		say "Of course! The obstruction! It must be Bryan. He must have been refueling the generator during the accident, and fallen into the separation chute!";
		now Bryan is seen;
	otherwise if Bryan is hurt:
		say "He's badly hurt, what on earth were you thinking of, attacking him.";
	otherwise:
		say "[if the plunger is part of Bryan]Yes, the plunger is stuck to bryan![otherwise if the long hook is part of Bryan]Yes the hook is stuck to Bryan![otherwise]What on earth is he doing down there. He must have been refueling the generator during the accident and been thrown in.";	
	
Instead of examining not stuck Bryan:
	if Bryan is unconscious, say "[if Bryan is on the tiny hammock]Poor bryan, you just hope his self-regeneration system can repair him.[otherwise]The poor little mites been through the wars, you must take him to his hammock to recuperate immediately!" instead;
	if Bryan is hurt:
		if the plunger is part of Bryan:
			 say "He's injured. One of his wings is missing, and there's a large dent near his shoulder. He's also got a plunger stuck to himself.";
		otherwise:
			say "He's injured. One of his wings is missing, and there's a large dent near his shoulder.";
	otherwise:
		if the plunger is part of Bryan:
			say "He's skidding around the place in a panic, frantically trying to get the plunger off his head.";
		otherwise:
			say "Bryan is the ship's janitor. A Korora bot, which is a rather expensive child's toy -- or a very cheap substitute for a cleaning droid. Originally designed to simply waddle around looking cute (for children below the age of 8), his circuitry has since been replaced with a black-market board, allowing him to carry out all the ship's janitorial duties with [italic type]some[roman type] efficiency.";

Instead of taking or pulling Bryan when Bryan is in the separation chute:
	if bryan is seen:
		say "It's not as simple as that, you can't quite reach down into the chute. You're going to need something to reach Bryan with, maybe a hook or something sticky.";
	otherwise:
		try examining Bryan.
		
Instead of asking not seen stuck Bryan about something:
	try examining Bryan.
		
Instead of asking seen stuck Bryan about something:
	say "Now's not the time to talk, you've gotta get bryan outta there!";


Section - Interacting with Bryan

Instead of asking Bryan about something:
	say "Bryan looks at you quizzically, as if to say 'Now, now, my dear fellow. You know I'm incapable of speech'."
	
Understand "talk to [bryan]"or "speak to [bryan]" as a mistake("Unfortunately, Bryan isn't blessed with the power of speech.")


Section - Following Bryan

Bryan has a room called last location.

Understand "follow [any person]" as following. Understand the commands "chase" and "pursue" as "follow".

Following is an action applying to one visible thing.

Check following:
	if the noun is the player, say "Wherever you go, there you are." instead;
	if the noun is visible, say "[noun] is right here." instead;
	if the last location of the noun is not the location, say "You don't know where [noun] has gone." instead.
	
Carry out following:
	let the destination be the location of the noun;
	if the destination is not a room, say "You can't follow [noun] there." instead;
	let aim be the best route from the location to the destination;
	say "(heading [aim])[line break]";
	try going aim.

Before bryan going:
	change the last location of bryan to the location of Bryan.	


Section - Bryan around the ship

Every turn when the Bryan can see the shattered glass:
	if bryan is visible:
		say "Bryan opens up his internal dustpan and cleans the shattered glass";
	remove the shattered glass from play.
	
Every turn when bryan can see the broken lid:
	if bryan is visible:
		say "Bryan grabs the broken lid with his magnetic extender and puts it into his internal incinerator."
	
Every turn when Bryan can see the bucket and a junk reward is on-stage:
	if bryan is visible:
		say "Bryan takes the bucket, and from a distance, throws the whole bally lot down the separation chute.";
	remove the bucket from play.
	
Every turn when the player can see bryan:
	if bryan has been hurt:
		if bryan is not resting:
			if bryan has been resting:
				say "Hey -- it's bryan. He's back up on his tracks already after you nearly killed him. 'Get back to work Bryan' you gesture.".


Section - Bryan's Movements

The altercation is a scene.The altercation begins when the fighting korora is in the starboard cargo hold and the giant space cockroach is in the starboard cargo hold. The altercation ends when the giant space cockroach is off-stage.

Fighting korora is a male animal. Fighting korora is scenery. The printed name of fighting korora is "furious bryan".

Understand "bryan" as the fighting korora.

Every turn when Bryan is in the location of the giant space cockroach for the first time:
	move fighting korora to the starboard cargo hold;
	remove Bryan from play;
	
Every turn during the altercation:
	now the space cockroach is scenery;
	if the altercation has been happening for 9 turns:
		remove fighting korora from play;
		move Bryan to the starboard cargo hold;
		remove the giant space cockroach from play;
	if the player is in the starboard cargo hold:
		say "[one of]As soon as Bryan spots the space cockroach, his eye turns blood red -- he simply detests giant space cockroaches. Regular sized space cockroaches he has no problem with, but any cockroaches taller than himself, then you're looking at one big Bryan problem. From out of his backpack, Bryan draws a set of vicious pirate's cutlasses.[or][if Bryan is hurt]Despite his injuries Bryan manages to summon up the strength to charge[otherwise]Bryan charges[end if] head first at the cockroach, cutlasses crossed about his chest, treads burning rubber in acceleration. The space cockroach pricks its antenna in recognition of the immiment danger and starts scuttling.[or]Bryan and the cockcroach scuttle and skid around the cargo bay in a figure of eight pattern, for what seems like forever until Bryan launches himself into the non-air.[or]Crash! Bryan lands on the cockroach's back, and is now riding him like a mechanical penguin riding a mechanical bull (shaped like a cockroach).[or]Bryan sharpens his blades and attacks -- the cockroach quickly flips over sending Bryan flying.[or] The cockroach charges at Bryan who uses his magnetic wings to elevate to the ceiling just in the nick of time to avoid the attack.[or]Bryan throws a cutlass at the cockroach which hits it on the rear end causing it to momentarily waddle in discomfort.[or]Bryan lands menacingly in front of the cockroach -- the startled cockroach now knows he's beat, turns around and starts scurrying towards the gaping breach as fast as it can.[or]Just as Bryan starts to chase after the cockroach you hold out a hand to bryan and slowly shake your head, gesturing to let the cockroach go. Bryan looks angry but does as you say.[or]The cockroach takes a last quick look over its cockroachy shoulder and dives out of the hull breach to the freedom of space. Bryan reluctantly puts away his cutlasses.[stopping]";	

Instead of taking unconscious bryan when Bryan is not on the tiny hammock:
	say "You scoop up the injured Bryan in your arms.";
	now the player carries Bryan.
	
Instead of taking Bryan when Bryan has been unconscious:
	say "There's no need for that now, Bryan seems to have recovered -- which is great, because you're not going to clean this ship up by yourself."
	
Instead of doing something other than looking, or opening, or going, or inserting, or putting when the player carries unconscious bryan:
	say "There's no time for that now, you need to put Bryan in his hammock to recuperate."
		
Instead of putting Bryan on something(called target):
	if the target is the tiny hammock:
		say "You put Bryan carefully on his hammock, and gently push it, to start it swinging. Bryan's power system is based on the technology within those 'shakeable' torches that you would frequently see on late night shopping channels. After a serious half an hours shaking, those torches would last well up to 4 minutes, projecting a slightly brighter than dim light. A few hours of swaying back and forth in his hammock, and Bryan should hopefully be right as rain -- if not you'll just have to buy a new Bryan on the RQD shopping network.";  
		now Bryan is on the tiny hammock;
	otherwise:
		say "The only thing you need to put Bryan on, is his hammock."
		
Instead of inserting Bryan into the tiny hammock:
	try putting Bryan on the tiny hammock.
	
Every turn when unconscious Bryan is on the tiny hammock:
	if a random chance of 1 in 3 succeeds:
		now bryan is not unconscious;
		now Bryan is resting.

Before bryan opening the stuck armoury door:
	now the armoury door is not stuck;
	now the armoury door is dented;
	if bryan is not visible:
		now the armoury door is bryan-opened;
	if bryan is visible:
		say "Bryan stops at the armoury door, reading the sign and analysing the problem. After a moments contemplation, Bryan reverses, bows his head, and starts motoring full throttle forwards -- BANG, Bryan headbutts the armoury door with such force that you feel a tremor underneath your feet. Bryan quickly shakes the stars out of his head and continues on his path.";
	
Every turn when Bryan can see the player, now bryan is passive.

Every turn when Bryan is passive:
	if a random chance of 1 in 2 succeeds, now Bryan is active.

Every turn when active Bryan is plungered:
	if bryan has been plungered for less than two turns, stop the action;
	let heading be the best route from the location of Bryan to the other side of random not inoperable door(called the destination) in the location, using doors;
	if the heading is a direction, try Bryan going the heading.
	
Every turn when active Bryan is grateful:
	if the location of Bryan is not the location of the player:
		let heading be the best route from the location of Bryan to the location of the player, using doors;
		if the heading is a direction, try bryan going the heading;
	otherwise:
		if Bryan has been grateful for more than 3 turns:
			if a random chance of 1 in 3 succeeds:
				now bryan is finding reward;
				now bryan is not grateful;
				stop the action;
						
Every turn when active Bryan is angry:
	if the location of Bryan is not the location of the player:
		let heading be the best route from the location of Bryan to the location of the player, using doors;
		if the heading is a direction, try bryan going the heading;
	otherwise:
		if Bryan has been angry for more than 2 turns:
			if a random chance of 1 in 2 succeeds:
				now bryan is unconscious;
				now bryan is not angry;
				stop the action;

Every turn when active Bryan is finding reward:
	if the location of bryan is not the Janitor's Cupboard:
		let heading be the best route from the location of bryan to the Janitor's Cupboard, using doors;
		if the heading is a direction, try Bryan going the heading;
	otherwise:
		now bryan is not finding reward;
		now Bryan is searching junk.
		
Every turn when active bryan is searching junk:
	if bryan has been searching junk for more than 3 turns:
		if a random chance of 1 in 3 succeeds:
			now bryan is not searching junk;
			move a random junk reward to Bryan;
			now bryan is fetching reward.
			
Every turn when active Bryan is fetching reward:
	if the location of Bryan is not the location of the player:
		let heading be the best route from the location of Bryan to the location of the player, using doors;
		if heading is a direction, try Bryan going the heading;
	otherwise:
		let gift be a random junk reward carried by Bryan;
		say "[if the location is the janitor's cupboard]Bryan raises something up to the skies with his magnetic wings in triumph, and puts the magnificent object into his backpack. He seems to have found what he's been looking for.[paragraph break][end if]Bryan bounces up and down a few times and produces something from his backpack. It looks like [a gift]. Without any warning, Bryan bats the [gift] towards you with the power of a champion pegballer. You try to duck under the projectile, but it hits you on the corner your helmet, briefly unbalancing you before falling into one of your flailing hands. You nod your head at Bryan in appreciation of the worthless junk -- after all, it's the thought that counts.";
		move a random junk reward carried by bryan to the player;
		record "receiving a gift from Bryan" as achieved; [! SCORING VALUE !]
		now bryan is not fetching reward;
		now bryan is returning home.
		
Every turn when active bryan is returning home:
	if the location of bryan is not the janitor's cupboard:
		let heading be the best route from the location of Bryan to the janitor's cupboard, using doors;
		if the heading is a direction, try bryan going the heading;
	otherwise:
		try bryan entering the hammock;
		now Bryan is not returning home;
		now bryan is resting.
		
Every turn when bryan is resting:
	if Bryan has been resting for more than 20[this should be longer but is kept short for testing] turns:
		if a random chance of 1 in 3 succeeds:
			if bryan is visible, say "[one of]Bryan is getting some shuteye on his hammock. [one of]You think for a second. Yes -- Bryan is quite literally getting some shut[italic type]eye[roman type], because Bryan only has one eye -- but humans have two eyes!? You think some more, shouldn't the saying be [']get some shut[italic type]eyes[roman type]['] because that's what your getting, unless you literally sleep [']with one eye open[']?[or]But then think again.[or][stopping][or]Bryan continues to recuperate on the hammock, swaying gently back and forth.[or]'Zzzzzzzzzzzzzzz' is the sound probably being made by Bryan's right now, or possibly a more robotic version, perhaps something like 'cheenzzzzbubbabubbabubba' or 'napnapnpachennnscroll..napapapacheenscroll'.[or]The curled up Bryan lies here on his hammock getting some well needed recuperation after his ordeal.[or] Bryan's tracks start rotating, looks like he's having a nightmare, or possibly a dream that he's running in the robo olympics.[as decreasingly likely outcomes]";
	if fixing the generator has ended:
		if bryan has been resting for more than 1 turn:
			if a random chance of 1 in 3 succeeds:
				now bryan is alive;
				try bryan exiting;
				now bryan is not resting;
				choose a random row in the Table of On-duty locations;
				now the on-duty destination of Bryan is the location entry;
				now Bryan is on-duty;
			otherwise:
				continue the action;
		otherwise:
			continue the action;
	otherwise:
		continue the action.
			
Instead of waking Bryan when Bryan is resting:
	say "Bryan falls off the hammock, startled, landing head first, unable to move. He looks like an upside down tortoise. He spins his tracks and rocks back and forth, back and forth, until, eventually, he rights himself.";
	silently try Bryan exiting;
	now Bryan is not resting;
	now Bryan is on-duty.
						
Every turn when active Bryan is on-duty:
	let heading be the best route from the location of bryan to the on-duty destination of bryan, using doors;
	if the on-duty destination of bryan is the bridge:
		if the bridge door is closed:
			change the on-duty destination of bryan to the Top Deck Fore Corridor;
		otherwise:
			continue the action;
	if the heading is a direction, try bryan going the heading;
	if the location of bryan is the on-duty destination of bryan:
		now bryan is working;
		now bryan is not on-duty.;

Bryan has a number called the work counter. The work counter is 1.

Every turn when bryan is working:
	increment the work counter of Bryan by 1;
	if the work counter of Bryan is 10:
		choose a random row in the Table of On-duty locations;
		now the on-duty destination of Bryan is the location entry;
		now bryan is not working;
		change the work counter of Bryan to 1;
		now bryan is on-duty;
		rule succeeds; 

Rule for writing a paragraph about working Bryan when the turn count is even:
	if bryan is visible:
		if the location of Bryan is the armoury:
			say "[one of]Bryan retrieves a canister of Mr Sheen and a rag from his backpack[or]Bryan squirts some Mr Sheen on the rag[or]Bryan starts polishing the Pacifier Rifles with remarkable efficiency[or] Bryan stands back and admires the now gleaming rack of guns, satisfied with his work[or]Bryan rearranges the pacifier rifles into order of shininess[or]Bryan puts away the Mr Sheen[cycling].";
		if the location of Bryan is the airlock:
			say "[one of]Bryan takes a bottle of oil from his backpack[or]Bryan squirts some oil on the airlock doors[or]Bryan retrieves some windowlean from his backpack[or] Bryan polishes the little porthole on the airlock doors until they're gleaming[or]Away goes the windowlean[or]Bryan is chilling in the airlock[cycling].";
		if the location of Bryan is the bridge:
			say "[one of]Bryan unleashes his internal hoover tube[or]Bryan's giving the carpeting in the Bridge a good going over with his vacuum[or]Bryan misses a bit while hoovering but you haven't the heart to take him to task because of it after all he's been through today[or]Bryan puts away his hose[or]Bryan is driving over the carpeting slowly, gently swaying from side to side -- he seems to like the feel of the velour carpeting[or]Bryan is taking a break[cycling].";
		if the location of Bryan is the briefing room:
			say "[one of]Bryan is plumping up the cushions on the comfy chair[or]Bryan continues to plump up the cushions on the comfy chair Those cushions ain't going to get much plumper, you think to yourself[or]Bryan grabs a can of Mr Sheen from his backpack[or] Bryan starts polishing the large oak table[or]You look at Bryan as he works. Say, he's getting a nice shine out of that table[or]Bryan accidentally bumps into the whiteboard, then looks around in embarrassment[or]Ouch, Bryan runs over your feet and wave's his wings at you, as if saying 'get outta my feet'[or]Bryan's taking a break[cycling].";
		if the location of Bryan is the en-suite:
			say "[one of]Bryan grabs a bottle of Splash from his backpack[or]Bryan starts cleaning the sink with the Splash and an old rag[or]Bryan puts away the bottle of disinfectant[or]Out comes Bryan's own mini-plunger[or]Surprisingly, Bryan doesn't actually do any plunging with the plunger, but adopts a fencing stance instead[or]Bryan is thrusting and parrying with his mini-plunger [or]Bryan's always held a dream that one day he could enter the robot olympics but Korora bot's don't qualify since they're toys. And the toy olympics is simply weak.[or] Bryan stops fencing with the plunger[or]Bryan does a robot yawn[cycling]";
		if the location of Bryan is the infirmary, say "Bryan is here fiddling with the examination pod.";
		if the location of Bryan is the top deck fore corridor:
			say "[bryan's corridor work]";
		if the location of Bryan is the top deck aft corridor:
			say "[bryan's corridor work]";
		if the location of Bryan is the canteen:
			say "[one of]Bryan looks over the mess that is the Canteen, and shakes his head[or]Bryan shuts down and curls up into a cube[or]Cleaning the canteen looks like its too much for Bryan, he's resting in the corner[cycling]. ";
		if the location of Bryan is the crew's quarters:
			say "[one of]Bryan heads over to the crew bunks[or]Bryan starts plumping the pillows on the crew's bunks[or]Bryan see's Hudson's bunk and sighs, what a mess[or]Bryan get's distracted by some of the pictures on Hudson's locker[or]Bryan shoots under the Doc's bunk and disappears[or]Bryan's sleeping again, you can just see his tracks under Doc's bed, well you'll let him rest for a while after the ordeal he's been through today[or]Bryan gets out from under the Doc's bed[cycling].";
		if the location of Bryan is the crew's toilets, say "[one of]Bryan grabs an extendable mop from his backpack[or]Bryan extends the mop and starts cleaning the floor[or]Bryan cleans the floor with his mop[or]Bryan is mopping the floor here, he looks exhausted[or]Bryan puts away the mop[cycling].";
		if the location of Bryan is the kitchen, say "[one of]Bryan stares dumbfounded at the mess in the kitchen.[or]Bryan starts racing around the Canteen tables in a figure of eight.[or]Bryan screeches to a halt[or]Bryan decides to finally do some work and takes a washcloth from his backpack[or]Bryan gently wipes down the Canteen tables[or]Bryan puts away the washcloth[cycling]";
		if the location of Bryan is the middle deck aft corridor, say "[bryan's corridor work]";
		if the location of Bryan is the middle deck fore corridor, say "[bryan's corridor work]";
		if the location of Bryan is the rec room, say "[one of]Bryan is here staring out the porthole[or]Bryan stares out the porthole, dreaming[or]Bryan heads over to the pinchinko table[or]Bryan's playing pinchinko here[cycling]";
		if the location of Bryan is the engine room, say "[one of]Bryan gets a tub of Brasso and a rag from his backpack[or]Bryan starts polishing the engines with the brasso'd up rag[or]Bryan's getting a nice shine out of the engines[cycling].";
		if the location of Bryan is the generator room, say "[one of]Bryan looks petrified[or]Bryan inches towards the generator[or]Bryan inches away from the generator[or]Bryan is looking at the some fungus on the wall[cycling]";
		if the location of Bryan is the janitor's cupboard, say "[one of]Bryan searched the junk here for interesting items[or]Bryan is zipping back and forth, searching the junk[cycling].";
		if the location of Bryan is the bottom deck corridor, say "[bryan's corridor work]";
		if the location of Bryan is the port cargo hold, say "Bryan is here, stocktaking.";
		if the location of Bryan is the starboard cargo hold, say "Bryan is here, stocktaking.";
	otherwise:
		stop the action.
		
To say bryan's corridor work:
	say "[one of]Bryan gets his extendable broom from out of his backpack[or]Bryan extends his broom and starts brushing the [location of Bryan]'s floor[or]Bryan continues to sweep the [location of bryan's] floor[or]Bryan really looks bored now, he's just leaning on his broom, staring into space[cycling]."
				
Bryan has a room called on-duty destination.

Table of On-duty locations
location
Armoury
Airlock
Bridge
Briefing Room
Captain's Quarters
En-suite
Infirmary
Top Deck Fore Corridor
Top Deck Aft Corridor
Canteen
Crew's Quarters
Crew's Toilets
Kitchen
Middle Deck Aft Corridor
Middle Deck Fore Corridor
Rec Room
Engine Room
Generator Room
Janitor's Cupboard
Bottom Deck Corridor
Port Cargo Hold
Starboard Cargo Hold

A junk reward is a kind of thing.

The old newspaper is a junk reward. The newspaper clipping is a junk reward. The delorean is a junk reward.

The description of the newspaper clipping is "It's an ancient clipping a 21st century newspaper called the Guardian3.0. It's from their technology section:

[fixed letter spacing]As the 21st century began to unfold it became increasingly clear that humanity needed to jump ship from an increasingly polluted, dirty, dangerous and Z-list celebrity infested world,and find another one to ruin. Governments began to pour money into interstellar research, funding multi-billion pound projects to find a power source that could fly humankind to the distant reaches of the galaxy to start anew.

It was therefore a big surprise that all of this money was essentially wasted when 13 year old school pupil Peter Smith from Basingstoke chanced upon a workable form of FTL travel in his Monday morning Chemistry class. Peter - initially tasked with performing a rather boring exercise related to copper sulphate - idly decided to mix three random bottles of chemicals together and heat the liquid excessively with his bunsen burner. Just as the chemistry teacher noticed the bubbling mixture and made a mad dash across the classroom to intervene, a large explosion filled the room. To Peter's surprise he was transported thousands of miles to central Bengal, where after a short tussle with a surprised tiger he died 3 weeks later from a septic leg wound. Other members of the class were considerably less fortunate. Class wag Paul Monroe found himself orbiting a gas giant 45 light years away, and quiet, studious Mandy Whitehouse found herself in the tail of a comet somewhere near Sirius B. The experts were amazed - using equipment with a total cost of £4.50 Peter had created a chemical engine capable of taking humankind across the universe. How it actually worked seemed unimportant, however there was no arguing that 10mls of distilled water, 10mls of sodium peroxide and 10mls of calcium oxide heated over a vigorous flame could cause space-time to bend in an alarming fashion.

Realising the potential NASA quickly bought up the rights from the Smith family, and in memory of that fateful day 50 years ago in Basingstoke every new 'Tiger Drive' bears an engraved picture of Peter's school photograph on the cowling. At the core of every drive sits a bunsen burner and the same three chemicals identical to those Peter used. However, to make the drive more marketable, billions were spent by NASA designing a sleek and shiny housing with lots of flashing lights and LCD panels. None of these actually do very much, but are of great comfort to space mechanics, who still remain skeptical at some of the science at work.

Rather disappointingly Peter only received a C for his Chemistry work that year, after teachers complained that he was 'occasionally tardy' in handing in his homework, and had a 'tendency to be distracted', even though he had probably made one of the most startling scientific discoveries of all time[variable letter spacing]".

The description of the old newspaper is "An interesting article catches your eye:

[fixed letter spacing]In today's paper I reminisced about one of the oft-overlooked text adventures from the 1980s: Hampstead. From its beginning in a squalid flat in East London to its eventual end in a large, multi-million pound manor in London's affluent NW3, you made American Psycho's Patrick Bateman look like a pussy cat in fluffy clothing as you manoeuvred through the 1980s Zeitgeist.

Even at that ripe young age, I recognised it as a welcome change from the swords and sorcery of most text adventures. It introduced a sense of satire to the new interactive genre, matched only by the magnificent Hitchhiker's Guide to the Galaxy. And now I look back on it, it seems that this gaming platform had and still has the best chance at creating compelling interactive stories.

I recently attended a Coding Dojo during the Festival season in Brighton where I sat like a lemon watching people far more computer literate than I programming a text adventure. I had no chance of contributing to the nuts and bolts of the project, but I could offer my thoughts on plot and direction. So, inspired by the trip down Hampstead's memory lane and spurred on by both the Dojo and Penguin's recent A Million Penguins WikiNovel experiment, I thought the talented gamesbloggers could create a text adventure ourselves, set in modern day, with modern themes, without an orc in sight. If it was worthy, we could release the final product on an independent platform.

All in favour in a bit of interactive collaboration, say Aye. If we get a critical mass, we'll set up a wiki and get started.[variable letter spacing]

-- A Krotoski".

The description of the delorean is "You recognise this. Stainless steel bodywork, gull-wing doors, flux-capacitor; it's a replica of the Delorean from that oscar winning sci-fi movie...what was it called...Short Circuit 2."


Section - Seeing Bryan

Instead of inserting the lit auroscope into the separation chute when bryan is not seen:
	if bryan is alive:
		say "It's still pretty dark in here....you see the problem though, a shiny silver plate -- hang on, it's moving back and forth. You aim the torch light to the top of the flapping steel sheet...a single eye peers back at you -- it's Bryan! 'Bryan!' you call, instinctively, momentarily forgetting you're inside your spacesuit. You look more closely for a second, it looks like he's wedged near the bottom. Thankfully, his oversized backpack seems to have born the brunt of the pulpifying mechanisms. You shine the light directly on his eye, and his eyelid flickers. He's alive!";
		now bryan is seen;
	otherwise if bryan is hurt:
		now Bryan is seen;
		say "It's still pretty dark in here....you see the problem though, a shiny silver plate -- hang on, it's moving back and forth. You aim the torch light to the top of the flapping steel sheet...a single eye peer back at you. It's Bryan! 'Bryan!' you call, instinctively, momentarily forgetting you're in your spacesuit. You look more closely for a second, he's hurt pretty bad. He's missing his left wing, and his body looks damaged, but he's still alive!";	

Instead of using the auroscope on the blockage:
	try inserting the noun into the second noun.

Instead of using the auroscope on the separation chute:
	try inserting the noun into the second noun.

Understand "use [auroscope] to illuminate/light/see/identify [blockage]" as inserting it into.

Understand "put [auroscope] in/down/into/inside [separation chute] " as inserting it into.

Understand "push [auroscope] in/down/into/inside [separation chute]" as inserting it into.

Understand "shine [auroscope] in/down/into/inside [separation chute]" as inserting it into.

Understand "illuminate [blockage] with/using [auroscope]" as inserting it into(with nouns reversed).

Understand "illuminate [separation chute] with/using [auroscope]" as inserting it into(with nouns reversed).

Understand "search [blockage] with/using [auroscope]" as inserting it into(with nouns reversed).

Understand "search [separation chute] with/using [auroscope]" as inserting it into(with nouns reversed).


Section - Saving Bryan

Instead of inserting something helpful into the separation chute when the noun is part of stuck Bryan:
	say "You've already put the [noun] in the chute, now you just need to pull it.".

Instead of inserting something helpful(called target) into the separation chute when Bryan is stuck:
	now the target is part of bryan;
	if the target is the plunger:
		say "You grasp the [plunger] and give it a tentative prod down the chute to locate [if Bryan is seen]Bryan[otherwise] the obstruction[end if]. You grab the end firmly, readying yourself, and push it down! You feel something. You gently tug the plunger..Yes! It seems to have stuck onto [if bryan is seen]Bryan[otherwise]the obstruction[end if]. Now you just need to pull it out." instead;
		now Bryan is plungered;
	otherwise if the target is the long hook:
		if Bryan is seen:
			say "You first make sure you have a good grip, and lower the hook down into the chute. With the torch in your other hand, you look for a small nook to hang the hook onto....ahhh the rucksack fabric. Most of the rucksack and its contents look to have been completely destroyed by the pulpifier, but Bryan's wing[if bryan is not hurt]s are [otherwise] is [end if]still in the torn arm straps. Carefully, you catch the fabric and give it a slight tug to make sure the connection's secure. Bryan's eye flickers, glows green, and he holds his wings together, bracing himself. Now all you need to do is pull.";
		otherwise:
			say "You lower the hook down the chute hoping to catch hold of the obstruction. You've spent quite a lot of time fishing for space trout, and the process is pretty much the same. You think you've got it -- yes, you've hooked onto something. Now you just need to pull.";
	otherwise:
		continue the action.
		
Instead of using something on the separation chute:
	try inserting the noun into the separation chute.
	
Instead of using something on Bryan:
	try inserting the noun into the separation chute.

Instead of doing something other than pulling with something helpful(called target):
	if the target is part of bryan:
		say "There's only one thing you need to do with that -- pull it.";
	otherwise:
		continue the action.

Before pulling the plunger when the plunger is part of bryan:
	If bryan is stuck:
		now the honnecourt generator is unclogged;
		now Bryan is in the Generator Room;
		if Bryan is hurt, now bryan is angry;
		if Bryan is alive, now bryan is grateful;
		move the plunger to the player;
		if Bryan is seen:
			say "You pull on the plunger hoping that the suction is strong enough to hold Bryan -- it's working. As bryan reached the top of the chute, you make a grab for him and haul him clear.";
		otherwise:
			say "You pull on the plunger as hard as you can -- it's working. Whatever it is, it's heavy. As the clog reaches the top of the chute, you spin around and start hauling the plunger over your shoulder like a sack of spuds. You throw yourself forward, and POP - out comes the obst.... it's Bryan the Janitor Bot!";
		reject the player's command;
	otherwise:
		say "You make a grab for the plunger and pull with all your strength -- the suction on this thing is truly unbelievable. With you pulling as hard as you can, and Bryan putting his tracks into reverse, the plunger comes loose and you're sent tumbling backwards.";
		now Bryan is not plungered;
		move the plunger to the player;
		reject the player's command.
		
Before pulling the long hook when the long hook is part of stuck Bryan:
	now the honnecourt generator is unclogged;
	now Bryan is in the Generator Room;
	if Bryan is hurt, now bryan is angry;
	if Bryan is alive, now bryan is grateful;
	say "[if bryan is seen]You pull on the hook gently, not wanting to tear Bryan's rucksack. Resistance....careful now...not moving. Going to have to pull harder...yes! You feel some movement. You look down the tunnel, you've got him...yes...now within arms distance, you reach out with your right arm, grab him under his tracks and haul him clear of the chute. You tumble backwards, and Bryan plummets down to the ground, briefly fluttering his wings, before bouncing on the floor.[otherwise]The tug on the wire a little, feeling the weight of the obstruction. It's heavy -- this better be one sturdy ex-hanger. You pull. Yes, you feel something slowly rising up the chute. You continue reeling in your catch, being ever careful not to let it become unhooked and go sliding back down again. Peering into the chute, you see the obstruction slowly come into view -- it's, it's Bryan The Janitor Bot! You make a grab for the poor little fellow as he comes within arms distance, and haul him clear of the chute.";
	reject the player's command.

Instead of inserting something not helpful(called target) into the separation chute when the generator is clogged:
	say "Putting the [target] in there won't [if seen Bryan is in the separation chute]help save Bryan. You need something to pull him out with![otherwise]help excavate the obstruction.".

Instead of inserting the hanger into the separation chute when the generator is clogged:
	if the hanger is not cut:
		say "The hanger isn't quite long enough to reach the obstruction. Maybe if you were to cut it, you could bend the hanger out, so it'd be longer.";
	otherwise:
		say "The cut hanger might be able to reach bryan, but first you need to bend it out."	.
	
Instead of taking the plunger when the plunger is part of Bryan:
	try pulling the plunger.

Instead of inserting the long hook into the separation chute when the plunger is part of Bryan:
	say "The plunger is already attached to [if Bryan is seen]Bryan[otherwise]the obstruction, putting [the long hook] down the chute is quite unnecessary.".
	
Instead of inserting the plunger into the separation chute when the long hook is part of Bryan:
	say "The long hook is already attached to [if Bryan is seen]Bryan[otherwise]the obstruction, putting the [plunger] down the chute is quite unnecessary.".
	
Instead of putting the plunger on not stuck Bryan:
	say "Bryan glares at you angrily, eye rotating wildly. You're not an expert in robo-speak (that's one class you flunked twice) but he seems to be saying something along the lines of 'You come near me with that plunger, buster, [one of]and I'll bust your ass[or]and I'll cane your hind, for ya[or]you're ass [italic type]will[roman type] be grass[or]it'll be your ass[or][at random]'.".
	
Instead of using something helpful on the blockage:
	try inserting the noun into the second noun.

Understand "use [something helpful] to snag/catch/lift/grab/remove [blockage]" as inserting it into.

Understand "put [something helpful] in/down/into [separation chute] " as inserting it into.

Understand "push [something helpful] into/in/inside [separation chute]" as inserting it into.

Understand "unclog [blockage] with/using [something helpful]" as inserting it into(with nouns reversed).

Understand "unblock [blockage] with/using [something helpful]" as inserting it into(with nouns reversed).

Understand "remove [blockage] with/using [something helpful]" as inserting it into(with nouns reversed).

Understand "save [bryan] with/using [something helpful]" as inserting it into(with nouns reversed) when bryan is seen.

Understand "kill [bryan] with/using [something dangerous]" as inserting it into(with nouns reversed) when bryan is seen.

Instead of inserting something into stuck Bryan:
	try inserting the noun into the separation chute.
	
Instead of putting something on stuck Bryan:
	try inserting the noun into the separation chute.
	
Instead of pushing seen Bryan, say "Are you crazy! That'd kill Bryan. In any case, if you really wanted to do that you'd need something to reach down into the chute to push him with."

Instead of pulling Bryan with the plunger:
	try inserting second noun into the separation chute.
	
Understand "pull out[bryan] with/using [the plunger]" as putting it on(with nouns reversed).
	
Instead of pulling the blockage with the plunger:
	try inserting second noun into the separation chute.
	
Understand "pull out[blockage] with/using [the plunger]" as putting it on(with nouns reversed).


Section - Killing Bryan

Instead of pushing the blockage, say "You try to reach into the chute, but the clog is too far down. Maybe if you put something down the chute, you could reach it.".

Before inserting the shovel into the separation chute when not seen Bryan is stuck:
	if Bryan is alive and Bryan is not hurt:
		now Bryan is hurt;
		say "You grab the [small shovel] firmly by the handle and give it a tentative shove to locate the obstruction. Readying yourself, you tighten your grip on the handle, and push downwards. You feel some movement; it seems to be working. Again, you put the shovel down the chute, and just as you are about to push you think you feel a pull on the shovel -- instinctively, you glance around to make sure the generator is switched off. Which of course it is, otherwise you wouldn't have had to come here in the first place. You must have imagined it. Right, one more shove should finish the job.";
		reject the player's command;
	otherwise if Bryan is hurt:
		now Bryan is dead;
		remove Bryan from play;
		now the generator is unclogged;
		say "You grasp the shovel firmly with both hands, and thrust it down the chute with force. You thrust again -- CRACK, you feel something shatter. You root around with the shovel..it's.. yes..it's all clear. Now, you've just gotta restart the generator and hope you haven't damaged something important.";
		reject the player's command.

Before inserting something(called target) into the blockage:
	try inserting the target into the separation chute instead.
	
Before inserting the shovel into the separation chute:
	if the shovel is not carried:
		if the shovel is in the location:
			try taking the shovel;
		otherwise:
			continue the action;
	otherwise:
		continue the action.
	
A person can be evil. 
The player is not evil.

Instead of inserting something dangerous into the separation chute when Bryan is seen for the first time:
	say "The only thing that's going to achieve is to hurt Bryan, you wouldn't want to do that, now, would you?" instead.
					
Instead of inserting something dangerous into the separation chute when Bryan is seen for the second time:
	if Bryan is in the chute:
		say "You stare sadistically into the chute at the helpless Bryan, and smile; you've never liked that pathetic excuse for a robot. You raise the [noun] and thrust it down! You crack Bryan's bodywork, tearing a wing off. One more attack and you'll be rid of that accursed robot.";
		now Bryan is hurt;
		now the player is evil;
	otherwise:
		continue the action.
		
Instead of inserting something dangerous into the separation chute when Bryan is seen for the third time:
	if Bryan is in the chute:
		say "Bye, bye Bryan. You viciously thrust the [noun] down, and laugh as it tears Bryan into two pieces, his remains falling through to the erosion chamber.";
		now bryan is dead;
		remove Bryan from play;
		now the honnecourt generator is unclogged;
	otherwise:
		continue the action.
	
Some dirty floor is a prop in the generator room. The description is "You study the floor carefully, but see nothing but some tracks in the dirt.".

Some tracks are part of the dirty floor. The description is "They're most likely caused by Bryan's tracks as he trundles about going about his work.".

Instead of inserting something into the separation chute when the honnecourt generator is unclogged, say "There's no need to put anything in there now, you've already dealt with the blockage.".


Section - Backup Generator

The backup generator is scenery in the Generator Room. The description is "The emergency generator hides to the side of the main generator like a baby elephant next to its mother.[if the honnecourt generator is not working] It's gently vibrating."

Instead of doing something other than examining with the backup generator:
	say "You don't want to go messing with that now, it's the only thing keeping this ship going."
	
Instead of attacking the backup generator, say "Right now, that's the only thing powering the ship. You'd be mad to smash it.";


Section - Bryan's here

A bucket is an open unopenable container in the generator room. Inside it are some leftovers and Bryan's whisk. The description of the bucket is "It's quite small. Larger than a child's toy bucket, but smaller than a full-sized one, and it's half-filled with bio fuel, last week's leftovers."

Instead of taking the bucket, say "It's doubtful that you're going to need to lug that gloopy mess around." 

Instead of emptying the bucket: say "No way. Fueling the generator is bryan's job. [if Bryan is stuck] You wonder where he could be? [end if][line break]"

The description of the leftovers is  "A gloopy slime, the colour of cabbage, porridge and carrots, with the consistency of mash. [if whisk is in the bucket]Hang on...a shiny object is sticking out of the ooze in the bucket.[end if]"

Understand "bio-fuel" or "fuel" or "bio fuel" as the leftovers.


Instead of taking the leftovers, say "Blech. You'd rather not."

Instead of filling the bucket with something, say "Filling the bucket isn't you job, it's Bryan's."

Understand "gloop" or "slime" or "bio-fuel" or "bio fuel" as the leftovers.

The description of Bryan's whisk is "This is one of Bryan's tools![if bryan is trapped] He must have been preparing the fuel for the generator here sometime ago. Where on earth could he be?"

The printed name of Bryan's whisk is "a whisk".

Rule for printing the name of Bryan's whisk when we have examined Bryan's whisk: say "Bryan's whisk". 

Understand "shiny object" or "object" as Bryan's whisk.

Instead of examining Bryan's whisk when Bryan's whisk is in the bucket:
	say "You'd need to pull it out of the gloop to see exactly what it is."

After taking Bryan's whisk for the first time:
	say "You squeamishly grab the object with your forefinger and thumb, and pull. From out of the gloop slides what appears to be some kind of whisk."

Instead of pulling Bryan's whisk, try taking Bryan's whisk. 

Rule for writing a paragraph about the bucket:
	if the bucket has not been handled:
		say "Next to the generator's separation chute lies [if the small shovel has not been handled][a small shovel], and [end if]an upturned bucket with bio fuel spilling out of it.";
	otherwise if Bryan's whisk is in the bucket:
		say "A bucket filled with leftovers lies on the floor here."
	
A small shovel is in the generator room. The shovel can be gloopy. The shovel is gloopy. The description is "The shovel is rather small, and brilliantly silver[if the shovel is gloopy] -- where it isn't cover in gloop[end if]."

Rule for printing the name of the shovel when the shovel is not gloopy or the whisk is handled:
	say "Bryan's shovel".
	
Every turn when the shovel is not gloopy or the whisk is handled:
	now the small shovel is proper-named.
	
Understand "bryan's shovel" as the small shovel when the small shovel is proper-named.

Instead of wiping the gloopy small shovel:
	say "You wipe away some of the gloop as best you can.[paragraph break]";
	now the shovel is not gloopy;
	say "Say, this shovel is inscribed with Bryan's initials: B."

Rule for writing a paragraph about the small shovel:
	if the bucket has been handled:
		continue the action;
	otherwise:
		stop the action.
		
Every turn when bryan is discovered:
	now the small shovel is proper-named.


Chapter - Janitor's Cupboard

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Janitor%27s_Cupboard

]

Section - Location Description

The Janitor's Cupboard is a room.
The description is "[if unvisited]Due to intelligent usage of space-time rifts, the janitor's cupboard appears around 40% bigger inside than it is outside. However, due to these rifts causing any unsecured items in the room to slowly slip into other areas in the universe, the crew have traditionally used it as a dumping ground for anything on board that has no clear storage location. As your eyes sweep around the room you notice in no particular order: a box full of mop heads; a copy of Space Janitor Magazine; a stuffed space gerbil; a half-eaten packet of Fruit Pastilles; the steering wheel from an Austin Allegro; 6 oversized hats with viking horns on; a dead mouse; and a shelf containing an e-book reader loaded with the complete works of Jeffrey Archer. Sighing, you console yourself remembering that, thanks to space time displacement, these items will be floating in orbit around the second moon of Jagulon Beta within a week.

[end if]A variety of hooks and shelves[if unvisited] also[end if] adorn the walls securing the more important items, and a badly damaged box of hoover bags balances precariously on a small footstool on the floor. At the far end of the room hangs a tiny hammock, and a collection of threadbare brooms finish off the room in style." 

The janitor's cupboard door is a doorway. 
The janitor's cupboard door is port of the Generator Room and starboard of the Janitor's Cupboard. 
The janitor's cupboard door is manual. 

Before going through the closed janitor's cupboard door:
	say "(first opening the [janitor's cupboard door])";
	silently try opening the janitor's cupboard door.

After opening the Janitor's Cupboard door:
	say "The door to the Janitor's Cupboard creaks open with the unwillingness of an old man's knee.".

Instead of exiting in the Janitor's Cupboard when the holder of the player is the Janitor's Cupboard:
	try going starboard.


Section - Props

Janitor junk is a prop in the janitor's cupboard. 
The description is "How on earth Bryan can get any rest living amongst this clutter is beyond you, but he doesn't complain. As you recall, it was his idea to sleep here in the first place. Johnson should really have been stuck with this bunk as a janitor bot technically outranks a cargo packer: janitor bots are in charge of maintaining vital equipment, like the honnecourt generator, whereas cargo packers...just...move boxes back and forth. And sometimes up and down too. But it was Bryan's decision, he loves foraging amongst the junk for useful (to Bryan, at least) artifacts to add to his backpack collection.".

Instead of taking the janitor junk, say "You'd better leave that rubbish for Bryan to forage through [if Bryan is trapped] -- if you can ever find him[end if]."

Understand "a box full of mop heads" or "mop heads" or " a copy of space janitor magazine" or "space janitor magazine" or "magazine" or "stuffed space gerbil" or "space gerbil" or "half-eaten packet of fruit pastilles" or "fruit pastilles" or "steering wheel" or "steering wheel from an austin allegro" or "oversized hats" or "hats" or "dead mouse" or "mouse" or "e-book reader" or "works of Jeffrey Archer" as the Janitor junk.

After going to the janitor's cupboard when the helmet is not worn for the first time :
	say "You sniff around, it smells faintly of turnips in here. This in itself is curious, as the turnip is generally not allowed on board space faring vessels since the Alpha Centaurian vegetable scandal of 2075."

Some threadbare brooms are a prop in the janitor's cupboard. The description is "These brooms have got slightly fewer whiskers than Michael Finnigan." 

Understand "broom" as the threadbare brooms.

Instead of taking the brooms, say "These brooms are completely threadbare and useless."

Instead of searching the brooms, say "You give the brooms a quick body search, but don't find anything incriminating."

A badly damaged box of hoover bags is a prop. 
It is on the small footstool. 
The description is "Bags for Bryan's internal vacuum cleaning system.".

Instead of taking the badly damaged box of hoover bags, say "Cleaning is Bryan's job. Anyway you don't have a manual vacuum cleaner on board. Bryan takes care of the all the hoovering and shake 'n' vac'ing.".

A small footstool is a chair in the Janitor's Cupboard. 
It is scenery. 
The description is "A small wooden footstool that Bryan uses as a chair.".

Instead of taking the small footstool, say "That's Bryan's chair, you'd better leave that alone or he'll be livid."


Section - Hooks and shelves
	
A variety of hooks are a scenery supporter in the Janitor's Cupboard. The description is "On the hooks you see [a list of things on the variety of hooks].".

Understand "wall" or "walls" as a variety of hooks.

On the variety of hooks are a hammer, a gardening fork, and a galvanised mop bucket.

The description of the hammer is "Hammer, as in Hammer, the tool... not MC Hammer. The hammer has a claw end for removing nails and a blunt end for flattening things with.".

After taking the hammer:
	say "It's hammer time -- but not [italic type]MC[roman type] hammer time, hammering things, hammer time.";
	continue the action.

The description of the gardening fork is "Unsurprisingly -- since your ship doesn't have a hydroponics bay -- the fork is in pristine condition, ready for some aerating action.".

Instead of taking the gardening fork, say "Just because the gardening fork helped you defeat the great Tuber Solanum during your penultimate catastrophe, doesn't mean it's going to be any use here. You're probably not going to be able to aerate your way out of this one.".

The description of the galvanised mop bucket is "A battered metal mop bucket that hasn't been even been emptied; that's sinister.".

Instead of taking the galvanised mop bucket, say "You don't want that sloshing around, soaking the really useful items in your [if the player carries more than ten things]markedly [end if]capacious inventory. Plus, you're not sure what lurks underneath the surface of the rancid water, anyway.".

The rancid water is part of the galvanised mop bucket. The description is "It's murky, grimey, filthy, and seems to bubble, just underneath the surface. Note to self: get Bryan to throw the whole creepy lot out of the airlock after this crisis is over.".

Instead of emptying the galvanised mop bucket:
	say "No way. There could be a mop bucket grue lurking beneath the surface of the water."

Instead of examining the rancid water for the second time:
	say "You gaze into the rippling waters and see a faint image -- that's, yes, you recognize it: it's the planet of the Potatoe Eaters (curiously named, as it's inhabitants are part spud, yet aren't, in fact, cannibals.) And that's the village, Organswept, on the night of the duel with the great Tuber Solanum, the council hall flag is raised at half mast, exactly as it was on... abruptly, the water become still and murky once again.".
	
Understand "mop bucket water" or or "grimy water" or "filthy water" or "mop water" as the rancid water.
	
Instead of doing it for the more than two times:
	say "(to be continued)[line break]".

Some janitorial shelves are a prop in the Janitor's Cupboard. The description is "These contain an assortment of uninteresting janitorial chemicals: defoaming agents, carpet detergent, bacterial removers, Mr Sheen etc.".

Instead of searching the janitorial shelves:
	say "You rifle through the assortment of cleaning supplies, but find nothing of any use."

Some uninteresting janitorial shelf items are part of the janitorial shelves. The description is "All the stuff on this shelf is the same; a veritable smorgasbord of -- quite frankly -- uninteresting cleaning accessories.".

Understand "defoaming agents" or "carpet detergent" or "bacterial removers" or "Mr Sheen" or "sheen" as the uninteresting janitorial shelf items.

Instead of taking the uninteresting janitorial shelf items, say "Excuse me? Captain's don't clean, that's what janitor bot's and cargo packers are for.".


Section - Bryan's things

Definition: bryan is trapped:
	if bryan is in the separation chute then decide yes;
	otherwise decide no.

The tiny hammock is an enterable scenery supporter in the Janitor's Cupboard. The description is "[hammock-status]".

To say hammock-status:
	say "A wire metal hammock, about 3ft long. This is where Bryan rests when not carrying out his duties. ";
	if bryan is on the tiny hammock:
		say "Bryan's here, gently swaying back and forth. Recovering after the trials of the day.";
	if bryan is trapped:
		say "[if bryan is seen]Holy cow! You just remembered! Bryan's still stuck in the separation chute! You better get him out of there, pronto -- if you can't  fix that generator you're doomed![otherwise] That's strange, he should really be here now, he's the only one of the crew not to leave for vacation. ";

Understand "small hammock" or "wire hammock" or "wire metal hammock" as the tiny hammock.

Instead of examining the tiny hammock when the player is on the tiny hammock, say "This is the least comfortable position you've ever been in."

Instead of entering the tiny hammock when Bryan is on the tiny hammock, say "That's occupied at the moment."

Instead of using the tiny hammock when the player is on the tiny hammock:
	say "Ahhh, this is the life. Relaxing inside a janitor's cupboard on a wounded vessel in a hammock designed for a robot half your size while wearing an uncomfortable spacesuit knowing that with every wasted second your growing ever closer to dying a horrible death from asphyxiation -- wait a sec. This isn't the life at all! You better fix this ship...and fast!";
		try exiting.

Instead of looking under the tiny hammock when the player is on the tiny hammock:
	say "You arch your neck downwards to peer underneath the hammock, swinging precariously, but don't see anything of interest."
		
Instead of sleeping when the player is on the tiny hammock:
	try using the tiny hammock.
	
Instead of using the tiny hammock:
	try entering the tiny hammock.


Section - The pliers

The pliers are in the janitor's cupboard. "You can just see a pair of pliers poking out of the junk here."

The printed name of the pliers is "pair of pliers".

Understand "pair of pliers" as the pliers.

The description is "One of Bryan's many tools. Slightly smaller than a regular pair, as is the norm with his gear. This one looks like it's been taken out of rotation as it's not the sharpest, but still perfectly usable.".


Chapter - Bottom Deck Corridor

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Lower_Deck_Corridor

]

Section - Location Description

The Bottom Deck Corridor is a room.
It is unscored. 
The description is "[if unvisited]You reach the bottom of the ladder with a sense of trepidation. The bowels of the ship are usually a symphony of machines clanking away; now, the still silence seems out of place. 

[end if]The bottom deck houses all the important ship business: the ship's generator is to the fore, the engine room to the aft, and two large cargo holds lie both port and starboard. There is also a ladder leading up to the rest of the ship." 

A ladder called the bottom deck ladder is in the Bottom Deck Corridor. 
The description is "It leads up to the middle deck.";

Instead of climbing or entering or using the bottom deck ladder:
	try going up using the bottom deck ladder. 
	
Instead of going down in the Bottom Deck Corridor:
	say "You're down as far as you can go."
	
Instead of examining the generator room door in the Bottom Deck Corridor:
	say "The generator room door is a plain wooden affair, half hanging off it's hinges."
	
Definition: a doorway is a cargo bay door:
	if it is the port cargo hold door, decide yes;
	if it is the starboard cargo hold door, decide yes;
	otherwise decide no.
	
Before opening a inoperable doorway(called target):
	if the target is a cargo bay door:
		say "[one of]The [target] is 10 inches thick, 16 by 12 feet in size, and isn't designed to open manually. Even if it was, it'd take at least six men to prise the heavy metal door open.[or]The only way you're going to get this door open is by fixing the generator.[stopping]" instead;
	otherwise:
		continue the action.


Chapter - Port Cargo Hold

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Port_Cargo_Hold

]

Section - Location Description

The Port Cargo Hold is a room.
The description is "[if unvisited]This cargo bay represents your livelihood. The biggest single room on board your modest vessel, you typically like to keep it crammed as full as possible since every square metre represents another pay cheque. In your current predicament none of that seems so important. With your crew on leave you're only carrying one shipment at the moment. You've built up a lucrative reputation shipping packages with a minimum of questions that the big chain firms wouldn't touch. This mysterious black box is no exception and normally you'd have no desire to find out what's inside.

[end if]Right now the cargo hold is mostly empty, with only shattered remnants of packing crates hinting at more profitable journeys. Empty shelves and unused security straps hang from the fore and aft walls. The port wall holds the cargo door for moving shipments in and out. Hanging from the ceiling is an array of storage clamps used to secure valuable and fragile items.[if the mysterious black box is on-stage]

You can see a control panel set into the wall, overhead a mysterious black box is secured in one of the clamps. To starboard, a door leads back to the lower deck corridor."

The port cargo hold door is a doorway. 
The port cargo hold door is port of the Bottom Deck Corridor and starboard of the Port Cargo Hold.

Instead of exiting in the port cargo hold when the holder of the player is the port cargo hold:
	try going starboard.


Section - Scenery

Some shattered packing of crates are props in the port cargo hold. The description is "It's such a shame. All this cargo bay, but so little cargo."

Some barren shelves are a prop in the port cargo hold. The description is "These shelves are usually filled to capacity with cargo, but now hold nothing but dust and the occasional space cockroach."

Understand "empty shelves" as the barren shelves.

Some security straps are a prop in the port cargo hold. The description is "These wonderful microfibers straps are used to hold your cargo in place."

Instead of cutting the straps, say "You're never going to be able to reach high enough to cut the straps."

Some storage clamps are a prop in the port cargo hold. The description is "These clamps are used to secure your very fragile items, and are operating using the control panel. At the moment they're all empty[if the mysterious black box is on-stage], apart from the one holding the [mysterious black box][end if]."


Section - The mysterious black box

The mysterious black box is scenery in the port cargo hold. 
The description of the mysterious black box is "Hanging from one of the ceiling clamps is a strange cube. The deep matte black surface is perfectly flat on each side devoid of any markings that might hint as to its contents. The ominous container swallows your gaze and fills you with a desire to avoid it at all costs. You were paid well to move this shipment without looking inside but it might contain something to help you survive this day."

Understand "strange cube" or "matte black surface" or "ominous container" or "black box" as the mysterious black box.

Instead of doing something other than examining with the mysterious black box, say "There's no way you're going to be able to do anything with the box while it's hanging from the ceiling.".

Instead of taking the mysterious black box, say "The box is too big to move around with you and is tightly secured by the ceiling clamp.".

The broken mysterious black box is a open openable container. The description is "The bashed and twisted remnants of an [antique bicycle] lie inside the box. This must have been worth a fortune but the fall from the ceiling has practically destroyed the artefact of ancient Earth culture. Your customer is going to be livid, but shipping black market relics like this is highly illegal so a least this won't see a courtroom.".

Instead of inserting something into the broken mysterious black box:
	say "Putting the [noun] in there won't achieve anything."

Instead of taking the broken mysterious black box, say "[one of]You could just about drag this lump of broken and twisted metal around with you but the rewards would almost certainly not be worth the hassle involved.[or] You need a bicycle as much as a fish needs a man.[at random]".

Rule for printing the name of the broken mysterious black box:
	say "broken mysterious black box";
	omit contents in listing.	

The antique bicycle is in the broken mysterious black box. 
The antique bicycle is scenery.
The description of the antique bicycle is "Well, by the looks of it, that used to be a top of the range Rally 3-speed mountain bike, circa 1988. Aluminium frame, shimano resin saddle, truecell power spline, yep that's the Rally 3-speed alright.[if the bicycle repair kit is in the broken mysterious box] All that's left of now that might be of any use (but ironically not to the bike itself) is a [bicycle repair kit].".

Understand "bicycle" or "bike" or "rally 3-speed" or "rally 3 speed" or "mountain bike" as antique bicycle.

Instead of using the bicycle:
	say "It's in no shape for that. Besides with your life at risk this is no time for a fun ride. "
	
Understand "ride [bicycle]" as using.

Instead of taking the antique bicycle, say "You could just about drag this lump of broken and twisted metal around with you but the rewards would almost certainly not be worth the hassle involved. or You need a bicycle as much as a fish needs a man."

Instead of fixing the antique bicycle:
	say "It's clearly beyond any hope of repair, and to be honest you can't imagine what you'd need it for."


Section - Bicycle Repair Kit

The bicycle repair kit is in the broken mysterious black box.
The description of the bicycle repair kit is "A general run of the mill kit, housed in a little green box. It has a piece of chalk, two wedge things for removing the tyre from a bike wheel and most importantly, some glue.[if the player wears the helmet] You're sure it smells nice too. Just like summertime. But you can't smell it through your helmet[otherwise] It sure does smell nice, just like summertime[end if].".

Understand "repair kit" or "kit" or "glue" or "rubber patches" or "piece of chalk" or "chalk" or "wedge things" or "wedge" as bicycle repair kit.

Does the player mean doing something with the bicycle repair kit when the bicycle repair kit is not handled: it is unlikely.

Instead of using the bicycle repair kit:
	say "You need to be more specific with what you want to use the [bicycle repair kit] on."

Instead of squirting the bicycle repair kit on something:
	try putting the bicycle repair kit on the second noun.

Instead of putting the bicycle repair kit on something:
	say "You'd better save the bicycle repair kit for something in need of repair."

Instead of using the bicycle repair kit on something:
	try putting the bicycle repair kit on the second noun.	
	
Does the player mean taking the bicycle repair kit when we have not examined the antique bicycle: it is unlikely.


Section - The control panel

The clamp control panel is in the port cargo hold. It is a scenery. The description is "This panel is used to operate the ceiling clamps above. There is a movement joystick, and some buttons to operate the clamps above, including a clamp release button.".

The movement joystick is part of the clamp control panel. The description is "It kinda looks like the joystick on one of those ancient Atari consoles. Cheap-looking and made of rubber.".

Instead of taking the movement joystick:
	say "You pull on the stick but it's stuck solidly in place[if we have examined the EVA pack]. It looks like you're going to need to find something else to help you repair the EVA pack[end if]."
	
Instead of pulling the movement joystick:
	try taking the movement joystick.

Instead of doing something other than examining the movement joystick, say "This isn't the time to be moving cargo about.".

A device called the clamp control panel buttons are part of the clamp control panel. 
The description is "These operate the clamps on the ceiling above.".
The control panel buttons are switched on.
Understand "button" or "buttons" or "clamp buttons" or "clamp control buttons" or "clamp release button" or "release button" or "release" as the  clamp control panel buttons.

Instead of using the clamp control panel:
	try switching off the clamp control panel.
	
Instead of pushing the clamp control panel:
	try switching off the clamp control panel.

After switching off the clamp control panel buttons:
	say "In an instant, the clamp is released and the mysterious box starts its freefall. As the box drops, you just hope that whatever's inside is well packed enough to survive the -- CRASH! The box smashes on the floor, seeming to both shatter and crumple at once. You stand for a moment staring at the splintered remains wondering just how you're going to explain its condition to your client.";
	remove the mysterious black box from play;
	move the broken mysterious black box to the port cargo hold.
	
Instead of pushing the clamp control panel buttons:
	try switching off the clamp control panel buttons.
	
Instead of using the clamp control panel buttons:
	try switching off the noun.

Understand "operate [clamp control panel buttons]" as switching off.

Understand "unclamp [clamp control panel buttons]" as switching off.

Instead of switching off the clamp control panel:
	try switching off the clamp control panel buttons.
	
Instead of doing something with the switched off clamp control panel buttons, say "Since the clamps no longer hold anything of interest, there's no need use the control panel anymore.".

Instead of switching on the clamp control panel buttons:
	try switching off the clamp control panel buttons.
	
Instead of pushing the clamp control panel buttons:
	try switching off the clamp control panel buttons.


Section - Gas Cylinder 4

gas cylinder 4 is a gas cylinder.
gas cylinder 4 is in the port cargo hold.


Section - The supplies crate

The supplies crate is in the port cargo hold. It is a fixed in place closed openable container. Inside it is some string, a packing knife, and a can of instant packing foam. The can of instant packing foam can be tried or untried. The can of instant packing foam is untried. "In the corner of the room squats a small supplies case."

The description of the packing knife is "A mini laser that is used to cut packing foam away when unpacking cargo. It is synchronised to ONLY cut the foam material."

Instead of examining the closed supplies crate:
	say "You keep this small box to store all the random junk you end up needing when dealing with cargo hauls.".

The description of the can of instant packing foam is "A small can of EZPAK Instant Foam. It sprays out a whipped cream like goo which rapidly expands and hardens into a styrofoam like material. Handy for securing cargo, protecting delicate items in transit and the occasional crew prank.".

Before taking the can of instant packing foam for the first time, say "Being the captain, you normally leave the cargo packing to other crew. But in this case it may come in handy.".

Instead of opening the can of instant packing foam:
	say "Unless you would like to be imprisoned in a spaceship-sized foam ball, opening a highly pressurized can of instant packing foam would not be the wisest thing to do.".
	
Instead of spraying something over something that is not the right starter nozzle for the first time:
	say "You spray a small glob into your hand to test. The goo rapidly expands, engulfing your palm and fingers before hardening into a blob of packing foam. With an effort, you shake it off, leaving it with a perfect palm imprint where your hand used to be.".
	
Understand "use [can of instant packing foam] on/with[something]" as spraying it over.

Instead of squirting the can of instant packing foam on something:
	try spraying the can of instant packing foam over the second noun.

Instead of spraying the can of instant packing foam over the hull breach:
	say "The packing foam is strong but certainly not strong enough to hold during re-pressurization.".
	
Instead of spraying the can of instant packing foam over something scenery:
	say "You write your name in packing foam on [noun] except the foam rapidly expands and hardens into an illegible blob before slipping off.".


Section - The Space-O-Lube tube

A space-o-lube tube is in the port cargo hold. The space-o-lube tube can be full or empty. The space-o-lube tube is full. 

The description of the space-o-lube tube is "It's a tiny tube, no bigger than your little finger. [if the foxstar note is part of the space-o-lube tube]Stuck on the tube with a small strip of cellotape is an envelope.[end if]" 

Does the player mean doing something to the space-o-lube brochure when the space-o-lube tube is enclosed by the location of the player: it is very unlikely.

Understand "space o lube" or "lube" or "oil" or "lubricant" as the space-o-lube tube.

Rule for writing a paragraph about the space-o-lube tube:
	if the space-o-lube tube is full:
		say "You can see a space-o-lube tube here[if the foxstar note is part of the space-o-lube tube] with an envelope attached to it[end if].";
	otherwise:
		say "On the floor is the empty space-o-lube tube."
		
Instead of taking the empty space-o-lube tube:
	say "That's not necessary, no doubt if you ever encounter another jammed door, a suitable product will materialize sooner or later." 

The foxstar note is part of the space-o-lube tube.

Instead of examining the foxstar note:
	if the foxstar note is part of the space-o-lube tube:
		say "You'd need to take the envelope before you can read it.";
	otherwise:
		say "It says:

SPACE-O-LUBE is proud to be part of a new Foxstar Advertising campaign. Foxstar are users of a remarkable new quantum timeshift pre-cognitive product interest evaluator. This product has been sent to you, as you have been identified by a time-independent needs analysis, performed three weeks ago, by our Foxstar Advertising partners. During this analysis (which scans the entirety of space and time for any individual who would require a lubricant optimised for stuck post-meteorite strike cargo ship doors) you were identified, and this parcel has been sent to you free via direct teleportation from our manufacturing plant situated just outside Telford (Earth). For your convenience we have also teleported a series of advertising brochures into a small plastic display situated just next to the jammed door in question. Please also find enclosed a small lemon-scented moist hand towel to wipe the excess lubricant that you will accidentally drop on your shoe in approximately 7 minutes time.

Our Foxstar partners wish you well, and hope in future we can pre-provide relevant goods that you may find useful at some point.".		

Understand "envelope" as the foxstar note.

Before taking the foxstar note when the foxstar note is part of the space-o-lube tube:
	now the foxstar note is handled;
	move the foxstar note to the player;
	say "You remove the envelope and open it. Inside is a note.";
	try examining the foxstar note;
	say "You take the enclosed lemon-scented moist hand towel.";
	move the small lemon-scented moist hand towel to the player;
	stop the action.  
	
The small lemon-scented moist hand towel is part of the foxstar note. The description is "It's certainly small, and does look a little moist, but you've no idea whether it's lemon scented or not."

Instead of opening the space-o-lube tube:
	say "To use the space o lube, you just need to squirt it on something."


Chapter - Starboard Cargo Hold

[All content for the following location should be taken from the following web page:

http://textadventure.org.uk/index.php?title=Spaceship:Starboard_Cargo_Hold

]

Section - Location Description

The Starboard Cargo Hold is a room. The starboard cargo hold can be cockroach-missing.

The description is "[starboard cargo hold description]".

To say starboard cargo hold description:
	say "The starboard cargo hold is normally used as an overflow for any cargo that won't fit in the port hold, or when two loads need to be separate. ";
	if the hull breach is in the starboard cargo hold:
		say "This is not a normal situation. ";
		if the hull breach is not partially sealed:
			say "Near the rear of the exterior wall is a large hole about the size of an average human (like yourself). ";
		otherwise:
			say "Near the rear of the exterior wall, the hull plate hangs loosely over the breach, waiting to be sealed in place. ";
	otherwise:
		say "The hull has been temporarily patched up with the hull plate and the bicycle repair kit. ";
	say "The rest of the room is [if something that is not the player is in the starboard cargo hold]largely[otherwise]entirely[end if] empty, all its contents having been sucked into the vacuum of space, along with whatever caused this mess.";
	if the player is in the starboard cargo hold for the first time:
		if the starboard cargo hold is cockroach-missing:
			say "[line break]There are signs that a giant space cockroach has been here. You carefully look around the starboard cargo hold, wary of being ambushed by the hiding beast but nothing happens. You scratch your helmet in confusion...I guess he just left. The cockroach probably just realised how afraid it was of your manly physique and Popeye arms. Clever little cockroach.";
	else:
		if the starboard cargo hold is cockroach-missing:
			say "[line break]That's strange. The giant space cockroach seems to have gone. You carefully look around the starboard cargo hold, wary of being ambushed by the hiding beast but nothing happens. You scratch your helmet in confusion...I guess he just left. The cockroach probably just realised how afraid it was of your manly physique and Popeye arms. Clever little cockroach.".

The starboard cargo hold door is a doorway. 
The starboard cargo hold door is starboard of the Bottom Deck Corridor and port of the Starboard Cargo Hold.	

Instead of exiting in the starboard cargo hold when the holder of the player is the starboard cargo hold:
	try going port.
	

Section - The hull breach

The hull breach is in the starboard cargo hold.
It is an enterable fixed in place scenery container.
The hull plate is in the hull breach.
The constellation of junk is in the hull breach.
The hull breach can be important or unimportant.
The hull breach is important.

Understand "hole" as the hull breach.

Definition: the hull breach is partially sealed:
	if the hull plate is part of the hull breach, decide yes;
	otherwise decide no.

The description is "[if we have not examined the hull breach]You slowly step towards the hole. [end if]It looks like a constellation of useless junk is slowly spinning about 40 metres from the ship. The largest object out there is a spare hull plate, just the right size to seal the hole you're currently looking through.[if the hull plate is part of the hull breach]The plate is in place and ready to receive the glue.".

Instead of examining the partially sealed hull breach, say "The breach is now loosely covered by a piece of hull plate rattling around over the hole. This isn't going to be secure until you find some way of sealing it in place.".
	
Rule for printing the name of the hull breach:
	say "hull breach";
	omit contents in listing.	

Instead of inserting something(called target) into the important hull breach:
	if the target is not the harpoon gun:
		say "What, and just let the [noun] disappear drift off into deep space?";			
	otherwise if the target is the harpoon gun:
		try firing the harpoon gun at the hull plate.

Instead of entering the not partially sealed hull breach for the first time:
	say "Doing that would be suicidal, you may reach the hull plate, but you'd never get back again.".
	
Instead of doing it for the second time:
	say "You throw yourself through the airlock towards the hull plate, which you completely miss, and start drifting aimlessly into space. As you slowly watch the ship get smaller and smaller you start thinking that diving out of the breach may not have been the best of ideas.";
	end the game saying "[youAsphyxiate][line break][yourDead]".
	
Instead of entering the partially sealed hull breach:
	say "There's no need to go out there now that you've recovered the hull plate.".

The patched hull is a scenery thing. 
It is fixed in place.

Instead of doing something other than examining the patched hull:
	say "There's no need to do anything with that, you wouldn't want the whole thing to come apart.".
	
Instead of firing the harpoon gun at the hull breach when the hull plate is out of reach:
	try firing the harpoon gun at the hull plate.
	
After going to the starboard cargo hold when the helmet is not worn for the first time:
	say "Upon entering the cargo hold, a strange smell, like decaying socks seems to be hanging in the air."

The description of the constellation of junk is "This junk is mostly stock that you haven't been able to get rid of, but were to miserly to throw out -- just who's going to buy a consignment of inflatable ice hole fishing plugs, or a set of protective banana coveralls, anyway?[if the hull plate is in the hull breach] The only useful thing amongst the lot appears to be a spare hull plate. Very useful."  


Section - Sealing the breach

Instead of sealing the hull breach with something:
	say "Before you can seal the breach, you're going to need a plate to cover the hole."

Instead of sealing the partially sealed hull breach with the bicycle repair kit:
	say "You pour sealant liquid from the kit across the edge of the hull breach where it meets the new plating. You place patch strips over the liquid and finally spray the coolant canister over whole area causing the sealant to form a genetic bond. This looks pretty secure, you smack it pretty hard with your foot to check but the sealant should have partially melted the hull plate into your hull now. This won't hold long term but should get you through the rest of the journey.
	
With the breach now patched you should be able to re-pressurise the ship using the engine room control panel.";
	fix the hull breach.
	
Instead of using something on the partially sealed hull breach:
	try sealing the hull breach with the noun.
	
Instead of putting something on the partially sealed hull breach:
	try sealing the hull breach with the noun.
	
Instead of using something on the partially sealed hull breach:
	try sealing the hull breach with the noun.
	
Instead of inserting something into the partially sealed hull breach:
	try sealing the hull breach with the noun.
			
Instead of sealing the hull breach with something:
	say "The [second noun] isn't going to be any use in fixing the breach.".

To fix the hull breach:
	remove the hull breach from play;
	remove the hull plate from play;
	move the patched hull to the starboard cargo hold.

[REDIRECTING THE ATTEMPT TO FIX THE HULL PLATE RATHER THAN THE BREACH]

Instead of putting something on the hull plate when the hull breach is partially sealed:
	try sealing the hull breach with the noun.
	
Instead of inserting something into the hull plate when the hull breach is partially sealed:
	try sealing the hull breach with the noun.

Instead of using something on the hull plate when the hull breach is partially sealed:
	try sealing the hull breach with the noun.
	
Instead of sealing the hull plate with something when the hull breach is partially sealed:
	try sealing the hull breach with the second noun.
	
[WAYS TO NOT ATTACH THE PLATE TO THE BREACH]

Instead of sealing the partially sealed hull breach with the hull plate:
	say "The plate is already hanging loosely over the breach. Now you just need to put something on the plate to glue it to the breach."

Instead of sealing the partially sealed hull breach with the space putty:
	say "Unfortunately, the space putty is more like liquid (when heated) rubber and possesses no adhesive properties of any kind."
	
[STREAM OF WAYS TO NOT SEAL THE HULL BREACH]

Instead of sealing the partially sealed hull breach with the delorean:
	say "Excellent idea! If you can just program the tiny car to drive in circles around fast enough to create enough friction heat to weld the plate to the hull then this just might work. Dammnit! Oh dear. It seems that the car isn't programmable...which is a shame as that was a capital idea you had there."
	
Instead of sealing the partially sealed hull breach with the hammer:
	say "The hull plate is already in the perfectly correct shape to close the breach and doesn't need panel beating. It needs something gluey...and repairy."
	
Instead of sealing the partially sealed hull breach with the mini fuel canister:
	say "Hmmmm, we're you planning on igniting the fuel and using it as a sort of DIY blow torch? Ingenious...but too risky. In any case, you probably need that fuel to solve another shipboard problem -- just a hunch."
	
Instead of sealing the partially sealed hull breach with the auroscope:
	say "It's a torch. Not a blowtorch."
	
Instead of sealing the partially sealed hull breach with the can of instant packing foam:
	say "You spray some packing foam over the edge of the hull plate, but it does nothing to secure the plate to the hull. It just gets it a little styrofoamy. You're going to need something stronger."
	
Instead of spraying the can of instant packing foam over the partially sealed hull breach:
	try sealing the hull breach with the can of instant packing foam.
	
Instead of squirting the can of instant packing foam on the partially sealed hull breach:
	try sealing the hull breach with the can of instant packing foam.


Section - The hull plate

Definition: the hull plate is out of reach if it is in the hull breach.

Definition: the hull plate is covering if it is part of the hull breach.

Instead of examining the out of reach hull plate:
	say "A spare hull plate, for use in emergency spaceship repair. How handy! It's a pity that it's a good 40ft out of reach."

Instead of examining the covering hull plate:
	say "The plate loosely covers the hull breach, and will stay that way unless you can find something to stick it in place with.".
	
Instead of taking the covering hull plate:
	say "The [hull plate] is in the right place, so there's no need to start lugging it around. You just need something to stick the plate to the breach.".

Instead of doing something other than examining or taking the out of reach hull plate:
	say "The hull plate is too far away to do that.".

Instead of putting the bicycle repair kit on the covering hull plate:
	try putting the bicycle repair kit on the hull breach.


Section - Recovering the hull plate

Instead of using the harpoon gun on the out of reach hull plate:
	try firing the noun at the second noun.

Instead of firing the harpoon gun at the out of reach hull breach:
	try firing the harpoon gun at the hull plate.

Instead of firing the harpoon gun at the out of reach hull plate:
	say "The harpoon flies gracefully through the vacuum of space towards its target. Crap, the harpoon smashed against the hull plate, just sending it spinning around. Looks like the plate is too strong to pierce. You wind the cable in, and retrieve the harpoon.
	
You wonder if you could combine something with the harpoon gun to make it stick to the hull plate. Possibly, but you're going to need to use something with awesome suction.".

Instead of firing the sticky harpoon gun at the out of reach hull plate:
	say "The harpoon flies gracefully through the vacuum of space towards its target. The suction cup attaches firmly to the plate with a satisfying plop (well...you imagine the noise occurring in the noiseless vacuum of space!) You slowly wind the cable in, effortlessly dragging the hull plate towards the ship. Finally the plate clangs into position (again your imagination fills in the noise), covering the hole neatly. Now that you've got the patch plate, you just need to use something to seal up the puncture with.";
	now the hull plate is part of the hull breach.

Instead of taking the out of reach hull plate:
	say "You put your arm out of the hull breach, stretching until you can't stretch no more. Your fingers dangle a mere 38ft short of being able to touch the plate. It looks like you're going to need a tool with a really long reach to retrieve it." .
	
Instead of firing the pacifist mk3 at the out of reach hull plate:
	say "You'd better not. That'd only serve to disintegrate the plate. Then you'd be in real trouble. Maybe you could fire something slightly less destructive at it though."


Section - Ways to not recover the hull plate

Instead of using the string on the out of reach hull plate:
	say "You throw one end of the string out of the breach towards the hull plate, but it just drifts off in the wrong direction. In any case, the string doesn't look strong enough, or long enough to haul in the bulky plate, anyway."
	
Instead of putting the string on the out of reach hull plate:
	try using the string on the hull plate.
	
Instead of tying the string to the out of reach hull plate:
	try using the string on the hull plate. 


Section - Harpoon Gun

Instead of examining the sticky harpoon gun:
	say "You gaze at the modified harpoon gun, positively beaming at your own ingenuity. This'll be a useful tool if you ever need to retrieve something out of reach.".
	
Instead of examining the stringy harpoon gun:
	say "The string is tied to the harpoon on the gun, now you just need to tie something else to the harpoon gun.".


Section - Plunger

Instead of examining the plunger when the plunger is part of the harpoon gun:
	say "The plunger is now tied to the harpoon."
	
Instead of examining the stringy plunger:
	say "The string is tied to the plunger.".


Section - The string

The string can be tangled. The string is tangled. 

The indefinite article of the string is "a".

The description of the string is "[if the string is tangled]A tangled ball of string.[otherwise]Some string, all ready to start tying things to other things.".

The printed name of the string is "tangled ball of string".
	
Before doing something other than examining or taking or dropping or unraveling with the tangled string:
	say "You're going to need to unravel the string first before it's going to be of any use." instead.
	
Unraveling is an action applying to one thing. 

Understand "unravel [something preferably held]" as unraveling.

Instead of unraveling the string:
	say "You patiently set to work unpicking the tangled knots in the string, seeking to answer the age old riddle.. how long is a piece of string? After much painstaking work you discover the answer to be. Double half it's length.";
		change the printed name of the string to "string";
	change the indefinite article of the string to "some";
	now the string is not tangled.
	
Understand the commands "untangle" as "unravel".
		
Instead of opening the string: try unraveling the noun.
Instead of pulling the string: try unraveling noun.

Check unraveling:
	if the noun is not the string:
		say "The [noun] isn't meant to be unraveled."
		
The string can be tied.
The string is not tied.

Instead of examining the string when the string is part of the sticky harpoon gun:
	say "The string is holding the plunger to the harpoon gun.".
	
Instead of examining the string when the string is tied:
	say "The string is tied to the [holder of the string].".
	
Definition: something is stringy if the string is part of it.
	
After printing the name of something stringy while taking inventory or listing nondescript items or writing a paragraph about:
	if the string is part of the sticky harpoon gun:
		continue the action;
	otherwise:
		say " with some [string] tied to it". 
		
Instead of taking or pulling the string when the string is part of something connectable:
	say "You untie the string from the [noun].";
	now the string is not tied;
	now the player has the string.
	
Understand "use [something connectable] on/with [string]" as tying it.
Understand "use [string] on/with [something connectable]" as tying it.
	
Instead of tying something connectable to the tied string:
	say "You tie the [noun] to the [holder of the string] using the [string] to create a plungerified harpoon gun.";
	create the modified harpoon gun.
	
Instead of tying the string to something connectable:
	now the string is part of the second noun;
	now the string is tied;
	say "You firmly secure the [string] to the [second noun]. Now all you need is something to fix to the string.".

Instead of tying something connectable to the string:
	try tying the second noun to the noun.

Instead of tying the tied string to something connectable:
	if the string is part of the second noun:
		say "The [string] is already tied to the [second noun], now you need to tie it to something else.";
	otherwise:
		say "You attach the [holder of the string] to the [second noun] with the string, creating a plungerified [harpoon gun].";
		create the modified harpoon gun.		
		
Instead of tying the tied string to something connectable:
	try tying the second noun to the noun.
	
Instead of tying the tied string to something not connectable, say "The [second noun] is not the thing you should be tying the [string] to.".


Section - Creating the modified harpoon gun

Instead of combining something connectable with something connectable:
	try tying the noun to the second noun.
	
Instead of putting something connectable on something connectable:
	try tying the noun to the second noun.
	
Instead of tying something connectable to something connectable:
	if the not tied string is not carried:
		if the string is visible:
			silently try taking the string;
			say "(first taking the string)[command clarification break]";
	if the string is carried:
		if the string is tangled:
			say "(first unraveling the string)[command clarification break]";
			silently try unraveling the string;
			say line break;
		say "You tie the [noun] to the [second noun] using the [string]. Now you've got an interesting tool. You should be able to fire this at a flat surface and retrieve something out of reach.";
		create the modified harpoon gun;
	otherwise:
		say "That might work but you'll need something to tie the [noun] to the [second noun] with.".

Instead of tying something connectable to something connectable when the string is tied:
	say "You tie the [noun] to the [second noun] using the string.";
	create the modified harpoon gun.
		
Instead of tying something connectable to something when the noun is part of something:
	say "The [noun] can't be tied while it's already attached to the [second noun]."
	
Instead of tying something connectable to something not connectable:
	say "You can't tie the [noun] to the [second noun], you may be able to tie it to something else though."
			
To create the modified harpoon gun:
	now the plunger is part of the harpoon gun;
	now the string is part of the harpoon gun;
	now the harpoon gun is sticky;
	now the harpoon gun is not connectable.
	
Understand "plungerified [harpoon gun]" as the harpoon gun when the harpoon gun is sticky.

To disassemble the sticky harpoon gun:
	if the player does not carry the harpoon gun:
		silently try taking the harpoon gun;
		say "(first taking the [harpoon gun][command clarification break])";
	now the player has the plunger;
	now the player has the string;	
	now the harpoon gun is not sticky;
	now the harpoon gun is connectable;	
	say "You disassemble your modifications to the harpoon gun."
	
Instead of taking or pulling something that is part of the harpoon gun:
	disassemble the sticky harpoon gun.
	
Section - Ways to not create the modified harpoon gun

Instead of putting the bicycle repair kit on the harpoon gun:
	say "You'd better not waste the glue in the repair kit on the still fully functional harpoon gun, you might need it to help patch up the ship."
	
Instead of using something on the harpoon gun:
	try putting the noun on the second noun.

Instead of squirting the bicycle repair kit on the second noun:
	try putting the noun on the second noun.
	
Instead of putting the space putty on the harpoon gun:
	say "That's not going to work. The putty isn't sticky like blue-tac, and it never will be."

instead of putting the gloopy putty on the harpoon gun:
	say "You put a spot of the gloopy putty onto the harpoon gun, but it just slides off. The putty isn't very sticky. It's more like rubber."
	
Instead of combining something with the harpoon gun:
	try putting the noun on the harpoon gun.


Section - The Giant Space Cockroach

Definition: the starboard cargo hold is infested if the giant space cockroach is in it.

The giant space cockroach is a neuter animal in the Starboard Cargo Hold. The description is "The cockroach is a metre long and 3ft high. It's thorax and abdomen are are dark, shiny and hard, like a conker soaked in vinegar. Its legs are covered in vicious spikes and its antennae are as thick as the horns of a bull. This is fine example of damn one hardy species of cockroach. A species that will no doubt inherit the galaxy someday." The  space cockroach is scenery.

Instead of attacking the giant space cockroach:
	say "What, with your bare hands? Are you sure? Your probably going to need a weapon to fell this beast. Preferably a gun."
	
Instead of doing it for the second time:
	say "You charge towards the giant space cockroach; it charges back at you. [if the player carries something]You quickly grab the nearest thing that comes to hand, [a random thing carried by the player], and [otherwise] You [end if]try to hit the enormous head, but your assaults come to nothing as the mouthparts close over your shoulder and start to gnaw. The pain is excruciating and you redouble your attempts to hurt the cockroach, but it seems impervious to your thrashings. It bites you again; the pain is too much and you pass out. Foureen hours later, what remains of your skull is expelled from the space-insect's anus.";
	end the game in death.
	
Instead of hitting the giant space cockroach with something for the first time:
	say "You sneak carefully up on the cockroach and raise the [second noun] to attack -- but at the very last moment you come to your senses and quietly sneak away. You doubt you can fell the pest with the [second noun]. You need something with more firepower.";

Instead of hitting the giant space cockroach with something for the second time:
	say "You grab the [second noun], and try to hit the enormous head, but your assaults come to nothing as the mouthparts close over your shoulder and start to gnaw. The pain is excruciating and you redouble your attempts to hurt the cockroach, but it seems impervious to your thrashings. It bites you again; the pain is too much and you pass out. Foureen hours later, what remains of your skull is expelled from the space-insect's anus.";
	end the game in death.

 Before throwing something at the giant space cockroach:
	try hitting the giant space cockroach with the noun.
	
Instead of examining the hull breach in the presence of the space cockroach, say "You wish you could get near enough to the hull breach to fix the problem, but with the giant space cockroach here, it's just too dangerous."

Encountering the giant space cockroach is a scene. Encountering the giant space cockroach begins when the player is in the starboard cargo hold for the first time.

When encountering the giant space cockroach ends:
	now the giant space cockroach is not scenery.

Encountering the giant space cockroach ends when the number of filled rows in the table of Encountering Cockroach text is 0.

Rule for writing a paragraph about the giant space cockroach when the turn count is odd:
		say  "[one of]The cockroach is nibbling on the the hull breach -- get away from there you disgusting degenerate pest![or]You see a cockroach here.[cycling]";

Rule for writing a paragraph about the giant space cockroach when the turn count is even:
		say  "[one of]The cockroach scuttles to the other side of the room.[cycling]";
	
Every turn during encountering the giant space cockroach:
	if bryan is not in the starboard cargo hold:
		repeat through the Table of Encountering Cockroach Text:
			if the giant space cockroach is visible:
				say "[text entry][line break]";
			blank out the whole row;
			rule succeeds.
	
Table of Encountering Cockroach Text
text
"As soon as you enter the cargo bay you see the shadow of a very large, and rather disgusting insect like creature disappear behind a row of boxes. Jesus O'Mally! It's a giant space cockroach. That's not quite as bad as a swarm of space grues but still terribly inconvenient all the same."
"The usual approach for dealing with these creatures is to adopt the Company standard xenobiological engagement procedure, which basically involves shooting the cockroach in the head with a PACIFIST MK3 plasma rifle..."
	
Instead of doing something other than attacking or looking or waiting or examining the giant space cockroach or closing or going or opening or taking inventory in the presence of the giant space cockroach:
	say "[if altercation is happening]You're too focussed on the altercation between Bryan and the giant space cockroach to do that.[otherwise]With the space cockroach here, it's too dangerous to do that."
	
Instead of attacking the giant space cockroach when the pacifist mk3 is carried:
	say "(using the Pacifist MK3)[command clarification break]";
	try firing the pacifist mk3 rifle at the giant space cockroach.

Before firing the pacifist mk3 rifle at the giant space cockroach:
	say "[if the altercation is happening]You gesture to Bryan to step out of the way and [otherwise]You [end if]fire a hail of plasma bullets at the space cockroach's head which shreds the poor thing into a thousand pieces, sending gelatinous goo splattering over the cargo hold and over your suit. You slowly lower the rifle. You've seen enough murder and death for one day. You place the rifle on the floor, pluck a cockroach antenna off your suit, and continue on with your mission.";
	move the pacifist mk3 to the starboard cargo hold;
	move the gelatinous goo to the starboard cargo hold;
	now the spacesuit is gooey;
	remove the giant space cockroach from play instead.

Before firing the harpoon gun at the giant space cockroach:
	say "You fire the harpoon gun but the cockroach's reflexes are two good and it deftly avoids the attack. You carefully reel in the harpoon. You need a weapon with more speed." instead.	

The gelatinous goo is a thing. "The cargo hold is spattered with the gelatinously gooey remains of the giant space cockroach."

The description of the gelatinous goo is "Blech, this cargo hold wasn't the cleanest before you decorated it in seven shaded of cockroach brains, so now it's a real mess. At least now you know what Johnson's first job is going to be when the crew return their holidays."

Understand "gooey remains" or "remains" as the gelatinous goo.

Instead of taking the gelatinous goo, say "Blech.....you'll hire in some cleaners to deal with that when you get to Eighteen."


Part - Outer Space

Chapter - Locations in the region

Outer_Space is a region. 
The outer space top, outer space middle, and outer space bottom are in outer_space.

The ship exterior is a backdrop. 
It is in Outer_Space. 
The description is "The Mighty Atom -- what a work of art.".

Understand "ship" or "vessel" or "baby" or "mighty atom" or " the mighty atom" as ship exterior.

Instead of doing something other than examining the ship exterior:
	say "The ships too big to do anything with it.".


Chapter - Outer Space Top

Outer Space Top is a room. The printed name of outer space top is "Outer space".
It is aft of the outer airlock door and above outer space middle.
The description of outer space top is "[if unvisited]Space.....damn big ain't it :)[paragraph break][end if]Spread out down below you is the battered hull of your once fine ship, The Mighty Atom.......ok so it wasn't in that great a condition when you bought it....but it's still YOUR ship and that's what matters most. Although looking at it from out here you make a mental note to book a spell in space dock when this crisis is over. Fore leads back to the relative safety of the airlock.".

Instead of going nowhere from outer space top, say "While there is nothing stopping you from going in that direction, your available fuel might have something to say about you ever getting back to your ship again.[if repairing the engines has not ended][line break]Best move down to the engines and try to fix them.[end if]".


Chapter - Outer Space Middle

Outer Space Middle is a room. The printed name of outer space middle is "Outer space (just above the engines)".
It is unscored.
It is above outer space bottom.
It is below outer space top.
The description of outer space middle is "Just a little further below you, you can see the exhaust vents for your ship's two anti-matter drives[if repairing the engines has not ended], one of them looks like it took a hit from the meteor you suspect breached the hull[end if].[paragraph break][if podLaunchStage is pod-alert]There is a gaping dark whole in the ship in front of you where the escape pod used to be before it jettisoned itself.[line break][otherwise]In front of you sits your trusty escape pod, at least you think its trustworthy despite never actually having used it since you bought the ship.[line break][end if][line break]You can just make out the red glow of the open airlock above you.".

Instead of going nowhere from outer space middle, say "While there is nothing stopping you from going in that direction, your available fuel might have something to say about you ever getting back to your ship again.[if repairing the engines has not ended][line break]Best move down to the engines and try to fix them.[end if]".


Chapter - Outer Space Bottom

Outer Space Bottom is a room. The printed name of outer space bottom is "Outer space (near the engines)".
It is unscored.
It is below outer space middle.
The description of outer space bottom is "The vast emptiness of interstellar space expands all around you as you float delicately at the bottom of your ship, in front of the business end of some very lethal (and ludicrously expensive) bits of equipment, your ships engines.[if unvisited] Which should, at this moment, be spewing forth a stream of plasma several kilometres long. Thankfully the engines are still broken otherwise you would have been atomised instantly...as it is you still feel the tingle of residual ions coursing through your body.[end if]".

Instead of going nowhere from outer space bottom, say "While there is nothing stopping you from going in that direction, your available fuel might have something to say about you ever getting back to your ship again.[if repairing the engines has not ended][line break]You've found the engines now, best get on with fixing them.[otherwise]Now you've fixed the engines, you better get back inside and see if they start.[end if]".


Section - The engines

The engines are scenery in outer space bottom.
The engines can be repaired. 
The left engine and the right engine are part of the engines. 
The left engine can be broken or fixed. 
The left engine is broken.
The right starter nozzle is part of the right engine. 
The right starter nozzle can be foamy. 
The right starter nozzle is not foamy. 
The right starter nozzle can be useful. 
The right starter nozzle is useful. 
The fuel line is part of the engines. 
The fuel line can be leaky. 
The fuel line is leaky. 
The fuel line can be gluey. 
The fuel line is not gluey.

Definition: the engines are doubly broken:
	if the left engine is broken and the fuel line is leaky, decide yes;
	otherwise decide no.
	
Definition: the engines are nozzle broken:
	if the left engine is broken and the fuel line is not leaky, decide yes;
	otherwise decide no.
	
Definition: the engines are fuel line broken:
	if the fuel line is leaky and the left engine is not broken, decide yes;
	otherwise decide no.

The description of the engines is "[if the engines are doubly broken]The external thrust ports of your two primary engines are lifeless, and considering how close you are to them right now, that's probably for the best. The internal surfaces have deep scorch marks burned into their surface from all the times you've pushed them beyond their operating limits, and even now you can still feel waves of heat emanating from them. You carefully examine both engine ports closely. The starter nozzle on the [left engine] seems to be gone, but thankfully the right nozzle is intact. It must have been ripped away in the impact, the engines will never ignite if you can't come up with a replacement. That's going to be hard out here. It also looks like the fuel compensation line has been ruptured, that will need to be patched too.[otherwise if the engines are nozzle broken]Your repairs to the fuel line look pretty good -- well considering the tools you had at your disposal anyway. You're still going to need to create a replacement starter nozzle for the left engine though.[otherwise if the engines are fuel line broken]The replacement starter nozzle seems to be doing a sterling job. For the moment, anyway. Now you just need to find some titanium plating to repair the fuel line.[otherwise]You look over your repairs to the engine with a sense of pride and triumph. Not bad, you just hope they do the trick."


Section - The left and right engines

The description of the left engine is "[if the left engine is broken]For the most part this engine is fine, however the starter nozzle used to ignite the engine core is completely missing.[otherwise]The replacement nozzle you made looks like it fits perfectly."

The description of the right engine is "This engine thankfully looks undamaged. The starter nozzle looks completely intact."

Instead of taking the right starter nozzle, say "You're afraid to take the start nozzle in case you break it, you're going to have to duplicate the nozzle out here somehow."

Instead of doing something other than examining with the not useful right starter nozzle, say "There's no need to do anything with that anymore."


Section - The fuel line

The description of the fuel line is "[if the fuel line is leaky]The titanium fuel compensation line to the engines has been ruptured. You could start the engines without this but without a way of compensating for variances in engine fuel load you'd stand little chance of navigating the ship anywhere. You don't fancy spinning in circles for 6 months until someone finds you so you better find some titanium and a way to patch this up. [otherwise]The curved kitchen tray is sealed around the puncture to the fuel line. You repairs look like they should last quite a while.[end if][if the fuel line is gluey] The sealant glue from the repair kit has been applied to the edge of the fuel line puncture."

Understand "fuel compensation line" as the fuel line.


Section - Fixing the left engine

Instead of putting the replacement starter nozzle on the left engine:
	say "You place the new nozzle over the gap in the engine and lock it into place. You're no expert on your ship's engines but you're pretty sure they don't emit the kind of radiation that would liquify the the nozzle. Even if they did, as long as it holds long enough for you start them up you should be able to get to a port before needing a new one.";
	now the replacement starter nozzle is part of the left engine;
	now the left engine is not broken;
	if the fuel line is not leaky:
		now the engines are repaired.
		
Instead of using the replacement starter nozzle on the left engine:
	try putting the replacement starter nozzle on the left engine.


Section - Fixing the fuel line

Instead of fixing the leaky fuel line:
	say "You're going to need to be a little more specific with how you want to fix it."

Instead of using the kitchen tray on the fuel line:
	try putting the kitchen tray on the fuel line.

Instead of putting the not curved kitchen tray on the fuel line:
	if the hammer is carried:
		say "You spend about 10 minutes panel beating the titanium using the hammer until it's wrapped around the fuel line. It looks just about right, but it won't stand up to any pressure unless you can find some way of sealing the panel in place.";
		now the kitchen tray is curved;
	otherwise:
		say "You place the piece of titanium over the rupture in the fuel line. You're going to need to curve this into place and you doubt you can do this with your bare hands."
		
Instead of putting the not curved kitchen tray on the gluey fuel line:
	say "The glue looks like it'd do a good temporary job of holding the tray to the fuel line, but the tray is simply the wrong shape to stick on. You're going to need to curve it with something.";
		
Instead of putting the not curved kitchen tray on the gluey fuel line when the player carries the hammer:
	now the kitchen tray is curved;
		say "You spend about 10 minutes panel beating the titanium into the right shape using the hammer and stick it on the gluey fuel line. Not bad. Not great either, but your patching job should hold until you take the ship for maintenence.";
	fix the leaky fuel line.
		
Instead of hitting the kitchen tray with the hammer:
	if the kitchen tray is not curved:
		say "You're on the right track, but first you need to put the tray on whatever you need to make the right shape of.";
	otherwise:
		say "You've already panel beat the tray into the correct shape, you don't need to hit it any more."
		
Instead of hitting the fuel line with the hammer:
	if the fuel line is leaky:
		say "Taking a hammer to the fuel line would probably only make things worse. In fact, there's no probably about it.";
	otherwise:
		say "What, and undo all the good work you've already done. Not likely."
		
Understand "beat [kitchen tray] with/using [hammer]" as hitting it with.
Understand "panel beat [kitchen tray] with/using [hammer]" as hitting it with.
		
Instead of putting the curved kitchen tray on the fuel line when the bicycle repair kit is carried:
	if the kitchen tray is gluey or the fuel line is gluey:
		continue the action;
	otherwise:
		say "This should work. Using sealant liquid, patch strips and the coolant canister in the bicycle repair kit you methodically fix the former baking tray over the fuel line. It looks surprisingly sturdy but you imagine it will be met with smug laughs from the repair teams when you get to a port. You just hope that Hudson doesn't find out what you'd done to his baking tray.";
	fix the leaky fuel line.
		
Instead of putting the curved kitchen tray on the fuel line:
	if the fuel line is gluey:
		say "This should work. You carefully the fix the tray over the gluey fuel line, tapping away at the edges to make sure it's secure. It looks surprisingly sturdy but you imagine it will be met with smug laughs from the repair teams when you get to a port.";
		fix the leaky fuel line;
	otherwise:
		say "The tray is now the right shape, but without something to stick the tray in place with, your stuck.";
	
To fix the leaky fuel line:
	now the fuel line is not leaky;
	now the kitchen tray is part of the fuel line;
	if the left engine is not broken:
		now the engines are repaired.
	
Instead of putting the curved gluey kitchen tray on the fuel line:
	say "This should work. You carefully the fix the tray over the gluey fuel line, tapping away at the edges to make sure it's secure. It looks surprisingly sturdy but you imagine it will be met with smug laughs from the repair teams when you get to a port.";
	fix the leaky fuel line.
	
Instead of putting the bicycle repair kit on the kitchen tray:
	if the kitchen tray is not gluey:
		if the kitchen tray is curved:
			say "You methodically apply some sealant liquid from the coolant canister in the bicycle repair kit to the kitchen tray. This seems ready to be put on the fuel line now.";
			now the kitchen tray is gluey;
		otherwise:
			say "The tray is still in the wrong shape, so applying sealent liquid from the bicycle repair kit won't work.";
	otherwise:
		if the kitchen tray is part of the fuel line:
			say "The glue's already holding the tray in place.";
		otherwise:
			say "You've got enough glue on there already."
		
Instead of putting the bicycle repair kit on the fuel line:
	if the fuel line is not gluey:
		say "You methodically apply some sealant liquid from the coolant canister in the bicycle repair kit to the fuel line.";
		now the fuel line is gluey;
	otherwise:
		say "There's enough glue on there already."
		
Instead of using the bicycle repair kit on the kitchen tray:
	try putting the noun on the second noun.

Instead of using the bicycle repair kit on the fuel line:
	try putting the noun on the second noun.


Chapter - Using the can of instant packing foam

Instead of spraying the can of instant packing foam over the right starter nozzle:
	say "You empty the entire can of foam around the intact starter nozzle, which forms up as a massive block around the component. You take one last look at the now useless can before catapulting it off into deep space. This better work.";
	remove the can of instant packing foam from play;
	now the right starter nozzle is foamy.
	
Instead of using the can of instant packing foam on the starter nozzle:
	try spraying the noun over the second noun.

Instead of putting the can of instant packing foam on the right starter nozzle:
	try spraying the noun over the second noun.

Understand "foamy block"or "foamy nozzle" or "ball of foam" or "foam" or "massive block" or "block" or "foamy ball" as the right starter nozzle when the right starter nozzle is foamy.

Does the player mean examining the foamy right starter nozzle when the location is outer space: it is likely. 

Does the player mean doing something with the can of instant packing foam when the right starter nozzle is foamy: it is unlikely.

Instead of taking the foamy right starter nozzle, say "You can't move it. Not without ripping off the starter nozzle and breaking your working engine. You should be able to cut the foamy block open though."

The description of the right starter nozzle is "[if the starter nozzle is foamy]The right starter nozzle is covered in a ball of foam which now just needs to be cut open.[otherwise]The nozzle is just a simple funnel-like device uses to release a controlled flow of ignition fluid into the engine core. There's no technology to it, just a simple shape but how are you going to fabricate a duplicate out here? Maybe you can find a can of InstaMould, Latext-it, or something similar on board the ship."


Section - Cutting the foamy right starter nozzle

Understand "cut open [foamy starter nozzle]" as cutting.

Understand "cut open [foamy starter nozzle] with/using [packing knife]" as cutting it with.

Instead of using the packing knife when the right starter nozzle is foamy:
	try cutting the starter nozzle with the packing knife.

Instead of cutting the foamy right starter nozzle with the packing knife:
	say "You carefully cut a single slice down the middle of the foam block until you can safely pull it away in two halves. Looks like you have a perfect mould of the starter nozzle. Now you just need something to fill it with that you can make the replacement nozzle with.";
	now the right starter nozzle is not foamy;
	now the right starter nozzle is not useful;
	move the mould to the player.
	
Instead of using the packing knife on the foamy right starter nozzle:
	try cutting the right starter nozzle with the packing knife.

Instead of doing something other than cutting or taking or examining the foamy starter nozzle:
	try taking the starter nozzle.
	
Instead of cutting the foamy right starter nozzle when the player carries the packing knife:
	say "(using the [packing knife])[command clarification break]";
	try cutting the right starter nozzle with the packing knife.


Section - The mould

The mould is a container. The description is "A makeshift mould made from packing foam.[if the space putty is in the mould] The space putty is setting in the mould[otherwise if the replacement starter nozzle is in the mould] The space putty should have set by now so it should be safe to open the mould."

Instead of examining the mould when the gloopy space putty is in the mould:
	say "Not long now till the space putty sets."

Instead of inserting something that is not the space putty into the mould:
	say "Putting the [noun] in there isn't going to achieve anything, but putting something else in might."

After inserting the gloopy space putty into the mould:
	say "You hold the two mould pieces together and pour the gloop inside. It should take a short while to set."
	
Understand "pour [space putty] into/in [mould]" as inserting it into.

Understand "fill [mould] with/using [something preferably held]" as inserting it into (with nouns reversed).
	
Instead of inserting the solid space putty into the mould:
	say "That'll probably work, but not while the space putty is a solid block. First, you're going to need to find a source of radiation to melt the putty with."
	
Instead of taking the space putty when the space putty is in the mould, say "Don't be so hasty. Give it a little more time to set."


Section - Fixing the engines

Instead of fixing the doubly broken engines:
	say "You wish it were that simple. You need to find a way to repair the ruptured fuel line and make a replacement starter nozzle for the left engine before you can get this to work." 

Instead of fixing the nozzle broken engines:
	say "You repairs to the fuel line look like they'll hold for a while but you've still got to make a replacement starter nozzle for the engines to work."

Instead of fixing the fuel line broken engines:
	say "You've done a great job in fashioning the replacement starter nozzle but you still need to find a way to fix the ruptured fuel line."


Part - Unconscious Land

Unconscious-land is a room. It is unscored. The printed name of unconscious-land is "Darker than dark"
